#include <CalibHistoCheck.h>
Inheritance diagram for CalibHistoCheck:
Public Member Functions | |
CalibHistoCheck (const std::string &name, ISvcLocator *pSvcLocator) | |
StatusCode | initialize () |
StatusCode | execute () |
StatusCode | finalize () |
virtual StatusCode | sysExecute () |
void | put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const |
void | put (DataObject *object, const std::string &address, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (const std::string &location, const bool useRootInTES=true) const |
TYPE * | getDet (IDataProviderSvc *svc, const std::string &location) const |
TYPE * | getDet (const std::string &location) const |
bool | exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
bool | exist (const std::string &location, const bool useRootInTES=true) const |
bool | existDet (IDataProviderSvc *svc, const std::string &location) const |
bool | existDet (const std::string &location) const |
TYPE * | getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
TYPE * | getOrCreate (const std::string &location, const bool useRootInTES=true) const |
bool | registerContext () const |
INTupleSvc * | evtColSvc () const |
IAlgContextSvc * | contextSvc () const |
TOOL * | tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const |
TOOL * | tool (const std::string &type, const IInterface *parent=0, bool create=true) const |
SERVICE * | svc (const std::string &name, const bool create=true) const |
IUpdateManagerSvc * | updMgrSvc () const |
IDataProviderSvc * | fastContainersSvc () const |
StatusCode | Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const |
StatusCode | Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
MsgStream & | msgStream (const MSG::Level level) const |
MsgStream & | always () const |
MsgStream & | fatal () const |
MsgStream & | err () const |
MsgStream & | error () const |
MsgStream & | warning () const |
MsgStream & | info () const |
MsgStream & | debug () const |
MsgStream & | verbose () const |
MsgStream & | msg () const |
const Statistics & | counters () const |
StatEntity & | counter (const std::string &tag) const |
MSG::Level | msgLevel () const |
bool | msgLevel (const MSG::Level level) const |
void | resetMsgStream () const |
bool | typePrint () const |
bool | propsPrint () const |
bool | statPrint () const |
bool | errorsPrint () const |
long | printStat (const MSG::Level level=MSG::ALWAYS) const |
long | printErrors (const MSG::Level level=MSG::ALWAYS) const |
long | printProps (const MSG::Level level=MSG::ALWAYS) const |
void | registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL) |
StatusCode | runUpdate () |
TransientFastContainer< T > * | getFastContainer (const std::string &location, typename TransientFastContainer< T >::size_type initial=0) |
StatusCode | release (const IInterface *interface) const |
unsigned long | release () |
const std::string & | context () const |
const std::string & | rootInTES () const |
double | globalTimeOffset () const |
virtual StatusCode | sysStart () |
virtual StatusCode | sysInitialize () |
virtual StatusCode | sysReinitialize () |
virtual StatusCode | sysRestart () |
virtual StatusCode | sysStop () |
virtual StatusCode | sysFinalize () |
virtual StatusCode | sysBeginRun () |
virtual StatusCode | sysEndRun () |
virtual const std::string & | name () const |
virtual const std::string & | version () const |
virtual StatusCode | configure () |
virtual StatusCode | terminate () |
virtual StatusCode | start () |
virtual StatusCode | stop () |
virtual StatusCode | reinitialize () |
virtual StatusCode | restart () |
virtual bool | isExecuted () const |
virtual void | setExecuted (bool state) |
virtual void | resetExecuted () |
virtual StatusCode | beginRun () |
virtual StatusCode | endRun () |
virtual Gaudi::StateMachine::State | FSMState () const |
virtual Gaudi::StateMachine::State | targetFSMState () const |
virtual bool | isEnabled () const |
virtual bool | filterPassed () const |
virtual void | setFilterPassed (bool state) |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
void | setOutputLevel (int level) |
IAuditorSvc * | auditorSvc () const |
IChronoStatSvc * | chronoSvc () const |
IChronoStatSvc * | chronoStatService () const |
IDataProviderSvc * | detSvc () const |
IDataProviderSvc * | detDataService () const |
IConversionSvc * | detCnvSvc () const |
IConversionSvc * | detDataCnvService () const |
IDataProviderSvc * | eventSvc () const |
IDataProviderSvc * | evtSvc () const |
IDataProviderSvc * | eventDataService () const |
IConversionSvc * | eventCnvSvc () const |
IConversionSvc * | eventDataCnvService () const |
IHistogramSvc * | histoSvc () const |
IHistogramSvc * | histogramDataService () const |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () const |
INTupleSvc * | ntupleSvc () const |
INTupleSvc * | ntupleService () const |
IRndmGenSvc * | randSvc () const |
IToolSvc * | toolSvc () const |
IExceptionSvc * | exceptionSvc () const |
ISvcLocator * | serviceLocator () const |
ISvcLocator * | svcLoc () const |
StatusCode | createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg) |
std::vector< Algorithm * > * | subAlgorithms () const |
virtual StatusCode | setProperty (const Property &p) |
virtual StatusCode | setProperty (const std::string &s) |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
virtual StatusCode | getProperty (Property *p) const |
virtual const Property & | getProperty (const std::string &name) const |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
virtual const std::vector< Property * > & | getProperties () const |
StatusCode | setProperties () |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
IMonitorSvc * | monitorSvc () const |
void | declareInfo (const std::string &name, const T &var, const std::string &desc) const |
void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const |
unsigned long | addRef () |
StatusCode | queryInterface (const InterfaceID &riid, void **) |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
Public Attributes | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
Protected Types | |
typedef std::map< std::string, StatEntity > | Statistics |
typedef std::map< std::string, unsigned int > | Counter |
typedef std::vector< IAlgTool * > | AlgTools |
typedef std::pair< IInterface *, std::string > | ServiceEntry |
typedef std::vector< ServiceEntry > | Services |
Protected Member Functions | |
StatusCode | releaseTool (const IAlgTool *tool) const |
StatusCode | releaseSvc (const IInterface *svc) const |
bool | isInitialized () const |
bool | isFinalized () const |
int | outputLevel () const |
IntegerProperty & | outputLevelProperty () |
void | initOutputLevel (Property &prop) |
Static Protected Attributes | |
static const bool | IgnoreRootInTES |
static const bool | UseRootInTES |
Private Attributes | |
IStatisticsSvc * | p_statsSvc |
Definition at line 10 of file CalibHistoCheck.h.
CalibHistoCheck::CalibHistoCheck | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Definition at line 18 of file CalibHistoCheck.cc.
00019 : 00020 GaudiAlgorithm(name,pSvcLocator) 00021 { 00022 }
StatusCode CalibHistoCheck::initialize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 24 of file CalibHistoCheck.cc.
00025 { 00026 if ( service("StatisticsSvc", p_statsSvc).isFailure() ) { 00027 error()<<" No StatisticsSvc available ! "<<endreq; 00028 return StatusCode::FAILURE; 00029 } 00030 00031 TH1F* h1 = new TH1F("Tdc","Tdc", 500, -500., 0. ); 00032 h1->GetXaxis()->SetTitle("ns"); 00033 if ( p_statsSvc->put("/File1/Calib/CalibPmt/Tdc", h1).isFailure() ) { 00034 error()<<"Could't register Tdc "<<endreq; 00035 } 00036 00037 TH1F* h2 = new TH1F("Adc","Adc", 400, 0., 40. ); 00038 h2->GetXaxis()->SetTitle("p.e"); 00039 if ( p_statsSvc->put("/File1/Calib/CalibPmt/Adc", h2).isFailure() ) { 00040 error()<<"Could't register Adc "<<endreq; 00041 } 00042 00043 info() << "Finished booking Histograms" << endreq; 00044 return StatusCode::SUCCESS; 00045 }
StatusCode CalibHistoCheck::execute | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 47 of file CalibHistoCheck.cc.
00048 { 00049 00050 TH1* tdcH = p_statsSvc->getTH1F("/File1/Calib/CalibPmt/Tdc"); 00051 TH1* adcH = p_statsSvc->getTH1F("/File1/Calib/CalibPmt/Adc"); 00052 if (tdcH && adcH) { 00053 00054 const DayaBay::CalibReadoutHeader* calibHeader 00055 = get<DayaBay::CalibReadoutHeader>( 00056 DayaBay::CalibReadoutHeaderLocation::Default); 00057 00058 if(!calibHeader) { 00059 error()<< "Could not find calibHeader" << endreq; 00060 return StatusCode::FAILURE; 00061 }else { 00062 if(!calibHeader->calibReadout()) { 00063 info() << "No CalibReadout in calibHeader. No tdc/adc will be filled." << endreq; 00064 return StatusCode::SUCCESS; 00065 } 00066 00067 const DayaBay::CalibReadoutPmtCrate* calibCrate 00068 = dynamic_cast<const DayaBay::CalibReadoutPmtCrate*>( 00069 calibHeader->calibReadout()); 00070 const DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts calib_chVec 00071 = calibCrate->channelReadout(); 00072 00073 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts::const_iterator cpcrIter 00074 = calib_chVec.begin(); 00075 00076 for(; cpcrIter!=calib_chVec.end(); ++cpcrIter) { 00077 00078 // Get charge on this PMT 00079 double charge = cpcrIter->maxCharge(); 00080 adcH->Fill(charge); 00081 00082 // Get time on this PMT 00083 vector<double> time = cpcrIter->time(); 00084 for(size_t len=0; len<time.size(); len++) tdcH->Fill(time[len]); 00085 } 00086 00087 } 00088 } else { 00089 error() <<" Could not retrieve Histograms "<<endreq; 00090 return StatusCode::FAILURE; 00091 } 00092 00093 return StatusCode::SUCCESS; 00094 }
StatusCode CalibHistoCheck::finalize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 96 of file CalibHistoCheck.cc.
00097 { 00098 debug() << "Finalizing..." << endreq; 00099 00100 return StatusCode::SUCCESS; 00101 }
IStatisticsSvc* CalibHistoCheck::p_statsSvc [private] |
Definition at line 20 of file CalibHistoCheck.h.