Commit 5551feef authored by Jochen Meyer's avatar Jochen Meyer Committed by Graeme Stewart
Browse files

adding functionality for CSC I-Lines (MuonCondInterface-02-00-03)

parent 8cc56c08
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCONDSVC_CSCICOOLSTRSVC_H
#define MUONCONDSVC_CSCICOOLSTRSVC_H
// ICoolStrFileSvc.h - interact with COOL conditions database for simple
// string data
#include "GaudiKernel/Service.h"
#include "StoreGate/StoreGate.h"
#include <string>
#include <vector>
#include "GaudiKernel/IInterface.h"
//#include "MuonCondData/CscCalibData.h"
class Identifier;
namespace MuonCalib {
class CscCondDataContainer;
class CscCondDataCollectionBase;
class CscICoolStrSvc : virtual public IInterface {
public:
static const InterfaceID& interfaceID();
/**mergeAndSubmitCondDataContainer merges the data in newCont with what is currently cached from COOL.
Then, it submits the new merged data for entry to cool (as of this writing the final write is done
with OutputCOnditionsAlg)
*/
virtual StatusCode mergeAndSubmitCondDataContainer(const CscCondDataContainer * newCont) = 0;
/**checkParameter returns 1 if parameter exists at that index, 0 if not
*/
virtual int checkIndex(const std::string & parName, unsigned int& index) const =0;
/**getParameter retrieves a particular parameter from the cached database. If an invalid parname is
given, or if the requested strip is not in the database, it will return a default value for the
retData.
They are essentially wrappers of the getParameterTemplated function.
@param retData data element returned
@param parName string defining what parameter it is you want
@param index index indicating what part of detector you want. Usually a hash Id, such as a channel or chamber hash.
*/
virtual StatusCode getParameter(uint8_t &retData, const std::string &parName, const unsigned int & index) const =0;
virtual StatusCode getParameter(uint16_t &retData, const std::string &parName, const unsigned int & index) const =0;
virtual StatusCode getParameter(uint32_t &retData, const std::string &parName, const unsigned int & index) const =0;
virtual StatusCode getParameter(int &retData, const std::string &parName, const unsigned int & index) const =0;
virtual StatusCode getParameter(float &retData, const std::string &parName, const unsigned int & index) const =0;
virtual StatusCode getParameter(bool &retData, const std::string &parName, const unsigned int & index) const =0;
/* direct access to avoid string look-ups */
virtual bool getRMS( float& val, const unsigned int & index) const =0;
virtual bool getSlope( float& val, const unsigned int & index) const =0;
virtual bool getNoise( float& val, const unsigned int & index) const =0;
virtual bool getF001( float& val, const unsigned int & index) const =0;
virtual bool getPedestal( float& val, const unsigned int & index) const =0;
virtual bool getT0Phase( bool& val, const unsigned int & index) const =0;
virtual bool getT0Base( float& val, const unsigned int & index) const =0;
virtual bool getStatus(uint32_t &status, const unsigned int & stripID) const =0;
/**getStatus returns the status from the local cache of the database
Although this can be retrieved by getParameter() now, this is retained for
backwards compatibility.
@param status status flag is stored here.
@param stripID hashID for strip you want status from
@param db database to retrieve status from, "pulser" or "run"
*/
virtual StatusCode getStatus(uint8_t &status, const unsigned int & stripID) const=0;
/**Layer hash used in index for getParameter retrieval of layer information*/
virtual unsigned int getLayerHash( const Identifier & id) const=0;
virtual StatusCode onlineIdToLayerHash(const unsigned int & onlineId, int & layerHash ) const=0;
virtual StatusCode layerHashToOnlineId(const unsigned int & layerHash, unsigned int & onlineId) const=0;
/**Gets the cool channel for a given chamber*/
virtual unsigned int getChamberCoolChannel( const Identifier & id) const=0;
virtual StatusCode onlineIdToCoolChamberChannel(const unsigned int & onlineId, unsigned int & chamCoolChan ) const=0;
virtual StatusCode coolChamberChannelToOnlineId(const unsigned int & chamCoolChan, unsigned int & ) const=0;
/**Get information about a given parameter by name*/
virtual StatusCode getParFolder(const std::string & name, std::string & folder) const =0;
virtual StatusCode getParCat(const std::string & name, std::string & cat) const =0;
virtual StatusCode getParDataType(const std::string & name, std::string & dataType) const =0;
virtual StatusCode getParNumHashes(const std::string & name, unsigned int& maxIndex) const =0;
/**Get index from the string identifier used in the cool database (as well as in
input files used by the CscCoolReadWriteStr algorithm in MuonCondCool Package)*/
virtual StatusCode stringIdToIndex(const std::string & idString, const std::string & cat, unsigned int & index) const=0;
virtual StatusCode indexToStringId(const unsigned int & index, const std::string & cat, std::string & stringId) const=0;
/**Extract information about category and put into collection*/
virtual StatusCode initCscCondDataCollection(CscCondDataCollectionBase * coll)const=0;
/**Conversions between online and offline identifiers*/
virtual StatusCode offlineToOnlineId(const Identifier & id, unsigned int &onlineId) const=0;
virtual StatusCode offlineElementToOnlineId(const Identifier & id, unsigned int &onlineId) const =0;
virtual StatusCode onlineToOfflineIds(const unsigned int & onlineId, Identifier &elementId, Identifier &channelId) const=0;
virtual StatusCode onlineToOfflineElementId(const unsigned int & onlineId, Identifier &elementId) const=0;
virtual StatusCode onlineToOfflineChannelId(const unsigned int & onlineId, Identifier &channelId) const=0;
/**Get details from ASM Number
since is inclusive
until is exclusive
*/
virtual StatusCode getAsmScope(int asmNum, int &measuresPhi, int & layerSince, int & layerUntil, int & stripSince , int & stripUntil)=0;
virtual int Access(std::vector<std::string>* strVec=0,std::vector<int>* intVec=0, std::vector<float>* floatVector=0) =0;
};
inline const InterfaceID& CscICoolStrSvc::interfaceID() {
static const InterfaceID IID_CscICoolStrSvc("CscICoolStrSvc",1,1);
return IID_CscICoolStrSvc;
}
}
#endif // MUONCONDSVC_CSCICOOLSTRSVC_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//vitrual interface for all the Muon CSC technologies
//
#ifndef ICSCConditionsSvc_h
#define ICSCConditionsSvc_h
//Gaudi Includes
#include "GaudiKernel/IInterface.h"
#include "AthenaKernel/IOVSvcDefs.h"
//#include "MuonCondSvc/MuonHierarchy.h"
//STL includes
#include <list>
#include <string>
//forward declarations
class Identifier;
class IdentifierHash;
class StatusCode;
class ICSCConditionsSvc: virtual public IInterface{
public:
virtual ~ICSCConditionsSvc(){}
static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
virtual StatusCode initInfo(IOVSVC_CALLBACK_ARGS) = 0;
virtual bool isGoodChamber(const Identifier & Id) const = 0;
virtual bool isGoodWireLayer(const Identifier & Id) const = 0;
virtual const std::vector<Identifier>& deadStationsId() const =0;
virtual const std::vector<Identifier>& deadWireLayersId() const=0;
virtual const std::vector<std::string>& deadStations() const =0;
virtual const std::vector<std::string>& deadWireLayers() const=0;
virtual bool isGood(const Identifier & Id) const =0;
};
inline const InterfaceID & ICSCConditionsSvc::interfaceID(){
static const InterfaceID IID_ICSCConditionsSvc("CSCConditionsSvc",1,0);
return IID_ICSCConditionsSvc;
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ICSC_DCSCONDITIONSSVC_H
#define ICSC_DCSCONDITIONSSVC_H
#include "GaudiKernel/IInterface.h"
#include <string>
#include <vector>
#include <algorithm>
#include "AthenaKernel/IOVSvcDefs.h"
#include "MuonCondInterface/ICSCConditionsSvc.h"
class Identifier;
class IdentifierHash;
class StatusCode;
class ICSC_DCSConditionsSvc : virtual public ICSCConditionsSvc {
public:
virtual ~ICSC_DCSConditionsSvc(){}
virtual StatusCode initInfo(IOVSVC_CALLBACK_ARGS) = 0;
static const InterfaceID & interfaceID();
private:
};
inline const InterfaceID & ICSC_DCSConditionsSvc::interfaceID(){
static const InterfaceID IID_CSC_DCSConditionsSvc("CSC_DCSConditionsSvc",1,0);
return IID_CSC_DCSConditionsSvc;
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCONDINTERFACE_ICSC_DCSCONDITIONSTOOL_H
#define MUONCONDINTERFACE_ICSC_DCSCONDITIONSTOOL_H
// Includes for Gaudi
#include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IOVSvcDefs.h"
#include "AthenaKernel/IAddressProvider.h"
//**********************************************************
//* Author Monica Verducci monica.verducci@cern.ch
//*
//* Tool to retrieve the CSC DCS Info from COOL DB
//* retrieving of tables from DB virtual interface
//*********************************************************
static const InterfaceID IID_ICSC_DCSConditionsTool("ICSC_DCSConditionsTool", 1, 0);
class ICSC_DCSConditionsTool: virtual public IAlgTool,
virtual public IAddressProvider {
public:
static const InterfaceID& interfaceID() {return IID_ICSC_DCSConditionsTool;};
virtual std::string HVFolderName() const = 0;
virtual std::string ChamberFolder() const = 0;
virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadHV(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadchamber(IOVSVC_CALLBACK_ARGS) = 0;
virtual const std::vector<Identifier>& deadStationsId()=0;
virtual const std::vector<Identifier>& deadWireLayersId()=0;
virtual const std::vector<std::string>& deadStations()=0;
virtual const std::vector<std::string>& deadWireLayers()=0;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCONDINTERFACE_IMDTCABLINGDBTOOL_H
#define MUONCONDINTERFACE_IMDTCABLINGDBTOOL_H
// Includes for Gaudi
#include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IOVSvcDefs.h"
#include "AthenaKernel/IAddressProvider.h"
class MdtIdHelper;
static const InterfaceID IID_IMDTCablingDbTool("IMDTCablingDbTool", 1, 0);
class IMDTCablingDbTool: virtual public IAlgTool,
virtual public IAddressProvider {
public:
static const InterfaceID& interfaceID() {return IID_IMDTCablingDbTool;};
virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadMezzanine(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadMDTMap(IOVSVC_CALLBACK_ARGS) = 0;
virtual std::string mezzanineFolderName() const = 0;
virtual std::string mapFolderName() const = 0;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//vitrual interface for all the Muon MDT technologies
//
#ifndef IMDTConditionsSvc_h
#define IMDTConditionsSvc_h
//Gaudi Includes
#include "GaudiKernel/IInterface.h"
//#include "MuonCondSvc/MuonHierarchy.h"
//STL includes
#include <list>
#include <string>
#include "AthenaKernel/IOVSvcDefs.h"
//forward declarations
class Identifier;
class IdentifierHash;
class StatusCode;
class IMDTConditionsSvc: virtual public IInterface{
public:
virtual ~IMDTConditionsSvc(){}
static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
///Return whether this service can report on the hierarchy level
//virtual bool canReportAbout(MuonConditions::Hierarchy h) = 0;
//@todo introduce hash identifier method
virtual StatusCode initInfo(IOVSVC_CALLBACK_ARGS) = 0;
//virtual StatusCode update_MDT(IOVSVC_CALLBACK_ARGS) = 0;
virtual bool isGoodChamber(const Identifier & Id) const = 0;
virtual bool isGoodMultiLayer(const Identifier & Id)const = 0;
virtual bool isGoodChannel(const Identifier & Id) const = 0;
virtual const std::vector<std::string>& deadMultiLayers()const =0 ;
virtual const std::vector<std::string>& deadTubes()const =0 ;
virtual const std::vector<std::string>& deadStations()const =0;
virtual const std::vector<Identifier>& deadLayersId()const =0 ;
virtual const std::vector<Identifier>& deadMultiLayersId()const =0 ;
virtual const std::vector<Identifier>& deadTubesId()const =0 ;
virtual const std::vector<Identifier>& deadStationsId()const =0;
virtual const std::vector<Identifier>& List_Chambers_with_deadTube() const =0;
};
inline const InterfaceID & IMDTConditionsSvc::interfaceID(){
static const InterfaceID IID_IMDTConditionsSvc("MDTConditionsSvc",1,0);
return IID_IMDTConditionsSvc;
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef IMDT_DCSCONDITIONSSVC_H
#define IMDT_DCSCONDITIONSSVC_H
#include "GaudiKernel/IInterface.h"
#include <string>
#include <vector>
#include <algorithm>
#include "AthenaKernel/IOVSvcDefs.h"
//#include "MuonCondSvc/MuonHierarchy.h"
#include "MuonCondInterface/IMDTConditionsSvc.h"
class Identifier;
class IdentifierHash;
class StatusCode;
class IMDT_DCSConditionsSvc : virtual public IMDTConditionsSvc {
public:
virtual ~IMDT_DCSConditionsSvc(){}
// map initialization method
virtual StatusCode initInfo(IOVSVC_CALLBACK_ARGS) = 0;
//virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
static const InterfaceID & interfaceID();
//protected:
//virtual const std::vector<std::string>& deadMultiLayers()=0 ;
//virtual const std::vector<std::string>& deadTubes()=0 ;
//virtual const std::vector<std::string>& deadStations()=0 ;
//virtual const std::vector<Identifier>& deadMultiLayersId()=0 ;
//virtual const std::vector<Identifier>& deadTubesId()=0 ;
//virtual const std::vector<Identifier>& deadStationsId()=0 ;
private:
};
inline const InterfaceID & IMDT_DCSConditionsSvc::interfaceID(){
static const InterfaceID IID_MDT_DCSConditionsSvc("MDT_DCSConditionsSvc",1,0);
return IID_MDT_DCSConditionsSvc;
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCONDINTERFACE_IMDT_DCSCONDITIONSTOOL_H
#define MUONCONDINTERFACE_IMDT_DCSCONDITIONSTOOL_H
// Includes for Gaudi
#include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IOVSvcDefs.h"
#include "AthenaKernel/IAddressProvider.h"
//**********************************************************
//* Author Monica Verducci monica.verducci@cern.ch
//*
//* Tool to retrieve the MDT DCS Info from COOL DB
//* retrieving of tables from DB virtual interface
//*********************************************************
static const InterfaceID IID_IMDT_DCSConditionsTool("IMDT_DCSConditionsTool", 1, 0);
class IMDT_DCSConditionsTool: virtual public IAlgTool,
virtual public IAddressProvider {
public:
static const InterfaceID& interfaceID() {return IID_IMDT_DCSConditionsTool;};
virtual std::string DropChamberFolderName() const = 0;
virtual std::string HVFolderName() const = 0;
virtual std::string LVFolderName() const = 0;
virtual std::string JTAGFolderName() const = 0;
virtual std::string SetPointsV0FolderName() const = 0;
virtual std::string SetPointsV1FolderName() const = 0;
virtual bool Simulation_Setup() const = 0;
virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadDropChamber(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadHV(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadLV(IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode loadJTAG(IOVSVC_CALLBACK_ARGS) = 0;
virtual const std::vector<std::string>& deadStations()=0;
virtual const std::vector<Identifier>& deadStationsId()=0;
//virtual const std::vector<std::string>& deadMultiLayer()=0;
virtual const std::vector<Identifier>& deadMultiLayersId()=0;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef IMDT_DQCONDITIONSSVC_H
#define IMDT_DQCONDITIONSSVC_H
#include "GaudiKernel/IInterface.h"
#include <string>
#include <vector>
#include <algorithm>
#include "AthenaKernel/IOVSvcDefs.h"
#include "MuonCondInterface/IMDTConditionsSvc.h"
class Identifier;
class IdentifierHash;
class StatusCode;
class IMDT_DQConditionsSvc : virtual public IMDTConditionsSvc
{
public:
// map initialization method
virtual StatusCode initInfo(IOVSVC_CALLBACK_ARGS) = 0;
static const InterfaceID & interfaceID();
};
inline const InterfaceID & IMDT_DQConditionsSvc::interfaceID(){
static const InterfaceID IID_MDT_DQConditionsSvc("MDT_DQConditionsSvc",1,0);
return IID_MDT_DQConditionsSvc;
}
#endif //
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONCONDINTERFACE_IMDT_DQCONDITIONSTOOL_H
#define MUONCONDINTERFACE_IMDT_DQCONDITIONSTOOL_H
// Includes for Gaudi
#include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IOVSvcDefs.h"
#include "AthenaKernel/IAddressProvider.h"
//**********************************************************
//* Author Monica Verducci monica.verducci@cern.ch
//*
//* Tool to retrieve the MDT Info from COOL DB provided by DQ
//* retrieving of tables from DB virtual interface
//*********************************************************
static const InterfaceID IID_IMDT_DQConditionsTool("IMDT_DQConditionsTool", 1, 0);
class IMDT_DQConditionsTool: virtual public IAlgTool,
virtual public IAddressProvider {
public:
static const InterfaceID& interfaceID() {return IID_IMDT_DQConditionsTool;};
virtual std::string NoisyFolderName() const = 0;
virtual std::string DeadFolderName() const = 0;
virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS) = 0;