#include <TESDemoUse.h>
Inheritance diagram for TESDemoUse:
Public Member Functions | |
| TESDemoUse (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 | |
| StringProperty | m_positronPath |
| StringProperty | m_neutronPath |
| StringProperty | m_antiNeutrinoPath |
| FloatProperty | m_window |
| IDataProviderSvc * | p_archiveSvc |
Definition at line 10 of file TESDemoUse.h.
| TESDemoUse::TESDemoUse | ( | const std::string & | name, | |
| ISvcLocator * | pSvcLocator | |||
| ) |
Definition at line 14 of file TESDemoUse.cpp.
00015 : 00016 GaudiAlgorithm(name, 00017 pSvcLocator) 00018 { 00019 declareProperty("PositronPath", 00020 m_positronPath="/Event/TESDemo/Positron", 00021 "Path from which to retrieve the Positron candidates"); 00022 declareProperty("NeutronPath", 00023 m_neutronPath="/Event/TESDemo/Neutron", 00024 "Path from which to retrieve the Neutron candidates"); 00025 declareProperty("AntiNeutrinoPath", 00026 m_antiNeutrinoPath="/Event/TESDemo/Anti-Neutrino", 00027 "Path, in the TES, into which the Anti-Neutrinos are stored"); 00028 declareProperty("TimeWindow", 00029 m_window=0.00005, 00030 "The maximum time between Neutron and Positrion"); 00031 }
| StatusCode TESDemoUse::initialize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 33 of file TESDemoUse.cpp.
00033 { 00034 00035 info() << "in initialize" 00036 << endreq; 00037 info() << m_positronPath 00038 << endreq; 00039 info() << m_neutronPath 00040 << endreq; 00041 info() << m_antiNeutrinoPath 00042 << endreq; 00043 00044 StatusCode status = service("EventDataArchiveSvc", 00045 p_archiveSvc); 00046 if (status.isFailure()) { 00047 Error("Service [EventDataArchiveSvc] not found", 00048 status); 00049 } 00050 00051 return StatusCode::SUCCESS; 00052 00053 }
| StatusCode TESDemoUse::execute | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 55 of file TESDemoUse.cpp.
00055 { 00056 00057 SmartDataPtr<TESDemoNeutron> neutron(eventSvc(), 00058 m_neutronPath.value()); 00059 if (0 == neutron) { 00060 return Print("No Neutron in this readout"); 00061 } 00062 00063 SmartDataPtr<DybArchiveList> positrons(p_archiveSvc, 00064 m_positronPath.value()); 00065 if (0 == positrons) { 00066 return Print("No Positrons have been found so far"); 00067 } 00068 00069 if (positrons->empty()) { 00070 return Print("No Positrons are currently available"); 00071 } 00072 00073 TESDemoAntiNeutrino::Container* antiNeutrinos = 0; 00074 bool searching = true; 00075 DybArchiveList::const_iterator finished = positrons->end(); 00076 DybArchiveList::const_iterator iter = positrons->begin(); 00077 while (searching && 00078 finished != iter ) { 00079 00080 TESDemoPositron* positron = dynamic_cast<TESDemoPositron*>(*iter); 00081 if (0 == positron) { 00082 return Error("Positron archive does not contain correct type"); 00083 } 00084 00085 double deltaTime = neutron->timeStamp().GetSeconds() 00086 - positron->timeStamp().GetSeconds(); 00087 if (m_window.value() < deltaTime) { 00088 searching = false; 00089 } else { 00090 TESDemoAntiNeutrino* antiNeutrino = 00091 new TESDemoAntiNeutrino(positron, 00092 neutron); 00093 00094 if (0 == antiNeutrinos) { 00095 antiNeutrinos = new TESDemoAntiNeutrino::Container(); 00096 } 00097 antiNeutrinos->add(antiNeutrino); 00098 00099 int positronId = positron->readout()->identifier(); 00100 int neutronId = neutron->readout()->identifier(); 00101 info() << "Stored one anti-neutrino built from readouts " 00102 << positronId 00103 << " and " 00104 << neutronId 00105 << endreq; 00106 } 00107 iter++; 00108 } 00109 00110 if (0 == antiNeutrinos) { 00111 info() << "No Anti-Neutrino candidates found" 00112 << endreq; 00113 return StatusCode::SUCCESS; 00114 } else { 00115 info() << "Time span of anti-neutrinos is:" << endreq; 00116 info() << " From: " << antiNeutrinos->earliest() << endreq; 00117 info() << " To: " << antiNeutrinos->latest() << endreq; 00118 00119 if (eventSvc()->registerObject(m_antiNeutrinoPath.value(), 00120 antiNeutrinos).isFailure()) { 00121 return Error("Failed to store anti-neutrinos in Event Store"); 00122 } 00123 } 00124 00125 return StatusCode::SUCCESS; 00126 }
| StatusCode TESDemoUse::finalize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 128 of file TESDemoUse.cpp.
00128 { 00129 00130 info() << "in finalize" 00131 << endreq; 00132 00133 if (0 != p_archiveSvc) { 00134 p_archiveSvc->release(); 00135 } 00136 00137 return StatusCode::SUCCESS; 00138 00139 }
StringProperty TESDemoUse::m_positronPath [private] |
Definition at line 23 of file TESDemoUse.h.
StringProperty TESDemoUse::m_neutronPath [private] |
Definition at line 24 of file TESDemoUse.h.
StringProperty TESDemoUse::m_antiNeutrinoPath [private] |
Definition at line 25 of file TESDemoUse.h.
FloatProperty TESDemoUse::m_window [private] |
Definition at line 27 of file TESDemoUse.h.
IDataProviderSvc* TESDemoUse::p_archiveSvc [private] |
Definition at line 29 of file TESDemoUse.h.
1.4.7