ATLAS Offline Software
Loading...
Searching...
No Matches
JiveXML::AlgoJiveXML Class Reference

Converts Reconstructed Event Data objects into XML files which can be read by, for example, the Atlantis graphics package. More...

#include <AlgoJiveXML.h>

Inheritance diagram for JiveXML::AlgoJiveXML:
Collaboration diagram for JiveXML::AlgoJiveXML:

Public Member Functions

 AlgoJiveXML (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
 Initialize - called once in the beginning.
StatusCode execute ()
 Execute - called for every event.
StatusCode finalize ()
 Finalize called once in the end.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::string > m_AtlasRelease {this, "AtlasRelease", "unknown", "The Athena release number"}
Gaudi::Property< bool > m_writeToFile {this, "WriteToFile", true, "Whether XML files shall be produced"}
Gaudi::Property< bool > m_onlineMode {this, "OnlineMode", false, "Whether an XMLRPC server shall be started"}
Gaudi::Property< bool > m_writeGeometry {this, "WriteGeometry", false, "Whether Geometry-XML files shall be produced"}
Gaudi::Property< std::string > m_geometryVersionIn {this, "GeometryVersion", "default", "Geometry version as read from Athena"}
Gaudi::Property< std::vector< std::string > > m_GeoWriterNames {this, "GeoWriterNames", {"JiveXML::GeometryWriter/GeometryWriter","JiveXML::MuonGeometryWriter/MuonGeometryWriter"}, "The names of the geometry-writer tools"}
Gaudi::Property< bool > m_ready4PhysicsAtStart {this, "Ready4PhysicsAtStart", false, "ATLAS is ready for physics when this job was launched"}
ToolHandleArray< JiveXML::IDataRetrieverm_DataRetrieverTools {this, "DataRetrieverTools", {}, ""}
 The list of DataRetrievers.
ToolHandle< JiveXML::IFormatToolm_FormatTool {this, "FormatTool", "JiveXML::XMLFormatTool/XMLFormatTool", "Format tool"}
 Handle to the formatting tool, which is passed on to the data retrievers and converts the data into XML.
ToolHandle< JiveXML::IStreamToolm_StreamToFileTool {this, "StreamToFileTool", "JiveXML::StreamToFileTool/StreamToFileTool", "Stream to file tool"}
 Streaming tools that pass the formatted XML text into a file, to a server, etc.
ToolHandle< JiveXML::IStreamToolm_StreamToServerTool {this, "StreamToServerTool", "JiveXML::StreamServerTool/StreamToServerTool", "Stream to server tool"}
uint32_t m_previousRunNumber =0
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Converts Reconstructed Event Data objects into XML files which can be read by, for example, the Atlantis graphics package.

Author
N. Konstantinidis
S. Boeser

Definition at line 30 of file AlgoJiveXML.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AlgoJiveXML()

JiveXML::AlgoJiveXML::AlgoJiveXML ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 22 of file AlgoJiveXML.cxx.

22 :
23 AthAlgorithm(name, pSvcLocator) {}
AthAlgorithm()
Default constructor:

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode JiveXML::AlgoJiveXML::execute ( )

Execute - called for every event.

  • retrieve general event information
  • call data retrievers
  • pass formatted events to streamers

Retrieve all the event header information

Then start a new event with this header information

Now iterate over all the IDataRetrievers and write their data to the xml file by giving it the XMLWriter

Finish the event with a proper footer

Now stream the events to all registered streaming tools

Definition at line 114 of file AlgoJiveXML.cxx.

114 {
115
116 if(m_onlineMode){
117 bool isR4PinThisEvent = false;
118 // Get the ready4physics bool at the start of this job and for the current time, during the job ATLAS might have become ready for physics, if this is the case we need to stop the jobs and let the partition restart them
119
120 // Acquire the Global Interpreter Lock (GIL) to ensure thread safety when interacting with Python objects
121 RootUtils::PyGILStateEnsure ensure;
122
123 // Import the EventDisplaysOnlineHelpers Python module
124 PyObject* pHelper = PyImport_ImportModule("EventDisplaysOnline.EventDisplaysOnlineHelpers");
125 if (!pHelper) {
126 // Error handling: Print Python exception if import fails
127 PyErr_Print();
128 ATH_MSG_WARNING("Failed to import EventDisplaysOnline.EventDisplaysOnlineHelpers module");
129 return StatusCode::FAILURE;
130 } else {
131 ATH_MSG_INFO("ready4Physics at start of job: " << m_ready4PhysicsAtStart);
132 // Get the "Ready4Physics" function from the module
133 PyObject* Ready4Physics = PyObject_GetAttrString(pHelper, "Ready4Physics");
134 if (!Ready4Physics || !PyCallable_Check(Ready4Physics)) {
135 // Error handling: Print warning if function not found or not callable
136 ATH_MSG_WARNING("Could not find or call Ready4Physics function in EventDisplaysOnline.EventDisplaysOnlineHelpers module");
137 } else {
138 // Call the "Ready4Physics" function
139 PyObject* r4p = PyObject_CallFunctionObjArgs(Ready4Physics, NULL);
140 if (!r4p) {
141 PyErr_Print();
142 ATH_MSG_WARNING("Failed to call Ready4Physics function");
143 } else {
144 // Convert the result to a boolean value
145 isR4PinThisEvent = PyObject_IsTrue(r4p);
146 ATH_MSG_INFO("isR4PinThisEvent: " << isR4PinThisEvent);
147 if(!m_ready4PhysicsAtStart && isR4PinThisEvent){
148 ATH_MSG_INFO("ATLAS was not ready for physics at the start of this job, but is now, so stopping job so that the partition can restart the jobs with any new configuration, i.e. after a warm start to pick back up pixel hits");
149 return StatusCode::FAILURE;
150 }
151 Py_DECREF(r4p); // Decrement reference count of the r4p object
152 }
153 }
154 Py_XDECREF(Ready4Physics);
155 }
156 Py_DECREF(pHelper);
157 }// End of if online
158
162 //The run and event number of the current event
163 unsigned int runNo = 0, lumiBlock = 0;
164 uint64_t eventNo=0;
165 //Date and time string of the current event
166 char dateTime[32];
167 //general event property, unused yet
168 std::string eventProperty = "default";
169
170 // geometry-version/geometry-tag from Athena (sourced via jOs)
171 std::string geometryVersion = "default";
173
174 //Retrieve eventInfo from StoreGate
175 const xAOD::EventInfo* eventInfo = nullptr;
176 if (evtStore()->retrieve(eventInfo).isFailure()){
177 ATH_MSG_FATAL("Could not find xAODEventInfo" );
178 return StatusCode::FAILURE;
179 }else{
180 ATH_MSG_DEBUG(" xAODEventInfo: runNumber: " << eventInfo->runNumber()
181 << ", eventNumber: " << eventInfo->eventNumber()
182 << ", mcChannelNumber: " << eventInfo->mcChannelNumber()
183 << ", mcEventNumber: " << eventInfo->mcEventNumber() // MC: use this instead of runNumber
184 << ", lumiBlock: " << eventInfo->lumiBlock()
185 << ", timeStamp: " << eventInfo->timeStamp()
186 << ", bcid: " << eventInfo->bcid()
187 << ", eventTypeBitmask: " << eventInfo->eventTypeBitmask()
188 << ", actualInteractionsPerCrossing: " << eventInfo->actualInteractionsPerCrossing()
189 << ", averageInteractionsPerCrossing: " << eventInfo->averageInteractionsPerCrossing()
190 );
191 }
192
193 //when running online, if a new run has started stop the jobs and let the partition restart the jobs to pick up any new configuration for the run
194 if(m_onlineMode){
195 ATH_MSG_INFO("m_previousRunNumber: " << m_previousRunNumber);
196 ATH_MSG_INFO("eventInfo->runNumber(): " << eventInfo->runNumber());
197 //don't check for first event
198 if(m_previousRunNumber!=0){
199 if(m_previousRunNumber != eventInfo->runNumber()){
200 ATH_MSG_INFO("Got a new run number, a new run has started whilst this job was running, stopping now to let the partition restart the jobs and pick up any new configuration");
201 return StatusCode::FAILURE;
202 }
203 }
204 //store run number to look at in the next event
205 m_previousRunNumber = eventInfo->runNumber();
206 }
207 // new treatment of mc_channel_number for mc12
208 // from: https://twiki.cern.ch/twiki/bin/viewauth/Atlas/PileupDigitization#Contents_of_Pileup_RDO
209 unsigned int mcChannelNo = 0;
210 bool firstEv = true;
211
212 //+++ Get sub-event info object
213 ATH_MSG_DEBUG( "Sub Event Infos: " );
214 for (const xAOD::EventInfo::SubEvent& subevt : eventInfo->subEvents()) {
215 const xAOD::EventInfo* sevt = subevt.ptr();
216 if (sevt) {
217 if (firstEv){
218 mcChannelNo = sevt->mcChannelNumber(); // the 'real' mc-channel
219 ATH_MSG_DEBUG( " mc_channel from SubEvent : " << sevt->mcChannelNumber() );
220 firstEv = false;
221 }
222 ATH_MSG_VERBOSE("Sub Event Info:\n Time : " << subevt.time()
223 << " Index : " << subevt.index()
224 << " Provenance : " << subevt.type() // This is the provenance stuff: signal, minbias, cavern, etc
225 << " Run Number : " << sevt->runNumber()
226 << " Event Number : " << sevt->eventNumber()
227 << " ns Offset : " << sevt->timeStampNSOffset()
228 << " Lumi Block : " << sevt->lumiBlock()
229 << " mc_channel : " << sevt->mcChannelNumber()
230 << " BCID : " << sevt->bcid()
231 << " Geo version : " << m_geometryVersionIn
232 );
233 }
234 else ATH_MSG_VERBOSE("Subevent is null ptr ");
235 }
236
237 //Get run and event numbers
238 runNo = eventInfo->runNumber();
239 eventNo = eventInfo->eventNumber();
240
241// Note: 4294967293 is the maximum value for a unsigned long
242
243 if ( mcChannelNo != 0 ){ runNo = mcChannelNo + 140000000; } // indicating 'mc14'
244 ATH_MSG_DEBUG( " runNumber for filename: " << runNo << ", eventNumber: " << eventNo);
245
246 if ( eventInfo->lumiBlock() ){
247 lumiBlock = eventInfo->lumiBlock();
248 }else{
249 lumiBlock = -1; // placeholder
250 }
251 if ( mcChannelNo != 0 ) lumiBlock = -1; // mask for mc11a
252
253 // lumiBlock from mc can be just huge number, ignore then
254 if ( lumiBlock > 1000000 ) { lumiBlock = 0; }
255
256 //Get timestamp of the event
257 //If Grid job not running in CEST or CET, change to UTC
258 //Only option to avoid odd timezones. jpt 29Mar11
259 size_t found1;
260 size_t found2;
261 if (eventInfo->timeStamp() > 0) {
262 time_t unixtime = (time_t) eventInfo->timeStamp();
263 struct tm time;
264 localtime_r(&unixtime, &time);
265 strftime(dateTime, 32, "%Y-%m-%d %H:%M:%S %Z", &time);
266 struct tm utctime;
267 gmtime_r(&unixtime, &utctime);
268 found1 = (DataType(dateTime).toString().find("CEST"));
269 found2 = (DataType(dateTime).toString().find("CET"));
270 if ( int(found1)<0 && int(found2)<0 ){ // not found is -1
271 strftime(dateTime, 32, "%Y-%m-%d %H:%M:%S UTC", &utctime);
272 ATH_MSG_DEBUG( " TIME NOT CET/CEST. Adjusted to:" << dateTime );
273 }
274 } else {
275 dateTime[0] = '\0'; // empty string
276 }
277 if ( mcChannelNo != 0 ){ dateTime[0] = '\0'; } // mask for mc11a
278
282 if ( m_FormatTool->StartEvent(eventNo, runNo, dateTime, lumiBlock, eventProperty, geometryVersion).isFailure() ){
283 ATH_MSG_FATAL("Couldn't start event in FormatTool");
284 return StatusCode::FAILURE;
285 }
286
291 ATH_MSG_DEBUG("Starting loop over data retrievers" );
292 //Loop over data retrievers
293 ToolHandleArray<IDataRetriever>::iterator DataRetrieverItr = m_DataRetrieverTools.begin();
294 for(; DataRetrieverItr != m_DataRetrieverTools.end(); ++DataRetrieverItr) {
295 //Add try-catch to avoid retrieval to fail on single retriever
296 try {
297 //Retrieve information and pass it to formatting tool object
298 if ((*DataRetrieverItr)->retrieve(m_FormatTool).isFailure()) {
299 ATH_MSG_WARNING( "Failed to fill " << (*DataRetrieverItr)->dataTypeName() );
300 } else {
301 ATH_MSG_DEBUG("Filled: " << (*DataRetrieverItr)->dataTypeName() );
302 }
303 //Only catch std::exception
304 } catch ( std::exception& ex ){
305 //Now show some message
306 ATH_MSG_FATAL("Caught exception in " << (*DataRetrieverItr)->name()
307 << " while retrieving data for " << (*DataRetrieverItr)->dataTypeName()
308 << " : " << ex.what() );
309 //and return with an error
310 return StatusCode::FAILURE;
311 }
312 }
313 ATH_MSG_DEBUG( "Finished loop over data retrievers" );
314
318 if ( m_FormatTool->EndEvent().isFailure() ){
319 ATH_MSG_WARNING( "Couldn't end event in FormatTool" );
320 return StatusCode::FAILURE;
321 }
322
326 if(m_writeToFile){
327 ATH_MSG_DEBUG("Streaming event to file");
328 if ( (m_StreamToFileTool->StreamEvent(eventNo, runNo, m_FormatTool->getFormattedEvent()).isFailure() )){
329 ATH_MSG_WARNING( "Could not stream event to file" );
330 }
331 }
332 if(m_onlineMode){
333 ATH_MSG_DEBUG("Streaming event to server");
334 if ( (m_StreamToServerTool->StreamEvent(eventNo, runNo, m_FormatTool->getFormattedEvent()).isFailure() )){
335 ATH_MSG_WARNING( "Could not stream event to server" );
336 }
337 }
338
339 return StatusCode::SUCCESS;
340 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
_object PyObject
ToolHandle< JiveXML::IStreamTool > m_StreamToServerTool
Definition AlgoJiveXML.h:68
ToolHandle< JiveXML::IStreamTool > m_StreamToFileTool
Streaming tools that pass the formatted XML text into a file, to a server, etc.
Definition AlgoJiveXML.h:67
ToolHandle< JiveXML::IFormatTool > m_FormatTool
Handle to the formatting tool, which is passed on to the data retrievers and converts the data into X...
Definition AlgoJiveXML.h:61
Gaudi::Property< bool > m_writeToFile
Definition AlgoJiveXML.h:44
uint32_t m_previousRunNumber
Definition AlgoJiveXML.h:70
Gaudi::Property< bool > m_onlineMode
Definition AlgoJiveXML.h:45
Gaudi::Property< bool > m_ready4PhysicsAtStart
Definition AlgoJiveXML.h:49
Gaudi::Property< std::string > m_geometryVersionIn
Definition AlgoJiveXML.h:47
ToolHandleArray< JiveXML::IDataRetriever > m_DataRetrieverTools
The list of DataRetrievers.
Definition AlgoJiveXML.h:55
uint64_t mcEventNumber() const
The MC generator's event number.
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t eventTypeBitmask() const
The event type bitmask.
uint32_t bcid() const
The bunch crossing ID of the event.
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
const std::vector< SubEvent > & subEvents() const
Get the pileup events that were used in the simulation.
uint32_t runNumber() const
The current event's run number.
uint32_t mcChannelNumber() const
The MC generator's channel number.
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
uint64_t eventNumber() const
The current event's event number.
time(flags, cells_name, *args, **kw)
std::string dateTime()
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
EventInfo_v1 EventInfo
Definition of the latest event info version.
setTeId lumiBlock

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode JiveXML::AlgoJiveXML::finalize ( )

Finalize called once in the end.

  • release all tools

Release all the tools

Definition at line 346 of file AlgoJiveXML.cxx.

346 {
347
348 ATH_MSG_VERBOSE( "finalize()" );
349
351 m_DataRetrieverTools.release().ignore();
352 m_FormatTool.release().ignore();
353 m_StreamToFileTool.release().ignore();
354 m_StreamToServerTool.release().ignore();
355
356 return StatusCode::SUCCESS;
357 }

◆ initialize()

StatusCode JiveXML::AlgoJiveXML::initialize ( )

Initialize - called once in the beginning.

  • Get StoreGate service
  • Get GeometryWriters and write geometry if asked for
  • Get the formatting tool
  • Get the data retrievers
  • Get the streaming tools, including defaults if asked for

Get the geometry writer tools and write geometries

Loop over names

Get a tool handle and retrieve the tool

Write geometry

Release tool

Get the formatting tools

Add default file streaming tools if requested

Get the streaming tools

Definition at line 32 of file AlgoJiveXML.cxx.

32 {
33
34 //be verbose
35 ATH_MSG_VERBOSE("Initialize()");
36
41
42 ATH_MSG_DEBUG("Writing geometry to file");
43
45 std::vector<std::string>::iterator GeoWriterNameItr = m_GeoWriterNames.begin();
46 for ( ; GeoWriterNameItr != m_GeoWriterNames.end(); ++GeoWriterNameItr){
47
49
50 ToolHandle<IGeometryWriter> GeometryWriter(*GeoWriterNameItr);
51 if ( GeometryWriter.retrieve().isFailure() ){
52 ATH_MSG_WARNING("Unable to locate "<<GeometryWriter.name()<<" tool");
53 } else {
55 if ( GeometryWriter->writeGeometry().isFailure() ){
56 ATH_MSG_WARNING("Unable to write geometry");
57 }
59 if ( GeometryWriter.release().isFailure() ){
60 ATH_MSG_WARNING("Unable to release tool GeometryWriter");
61 }
62 }
63 }
64 }
65
69 ATH_MSG_DEBUG("Retrieving XML format tool");
70
71 //Retrieve the format tool
72 ATH_CHECK(m_FormatTool.retrieve());
73
74 //Setting the tags
75 if ( m_FormatTool->SetTag( TagType("Release",m_AtlasRelease)).isFailure() ){
76 ATH_MSG_WARNING( "Couldn't set Release version" );
77 }
78
82 ATH_MSG_DEBUG("Retrieving streaming tools");
83 if (m_writeToFile){
84 ATH_MSG_INFO("Retrieving default file streaming tool");
85 ATH_CHECK(m_StreamToFileTool.retrieve());
86 }
87 ATH_MSG_INFO("online " << m_onlineMode);
89 if (m_onlineMode){
90 ATH_MSG_INFO("Retrieving default server streaming tool");
92 }
93
94
95 ATH_MSG_INFO("Retrieving data from " << m_DataRetrieverTools.size() << " tools" );
96
97 ATH_MSG_INFO("List property settings: ");
98 ATH_MSG_INFO("AtlasRelease: " << m_AtlasRelease);
99 ATH_MSG_INFO("WriteToFile: " << m_writeToFile);
100 ATH_MSG_INFO("OnlineMode: " << m_onlineMode);
101 ATH_MSG_INFO("WriteGeometry: " << m_writeGeometry);
102 ATH_MSG_INFO("GeometryVersion: " << m_geometryVersionIn);
103 ATH_MSG_INFO("GeoWriterNames: " << m_GeoWriterNames );
104
105 return StatusCode::SUCCESS;
106 }
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_writeGeometry
Definition AlgoJiveXML.h:46
Gaudi::Property< std::vector< std::string > > m_GeoWriterNames
Definition AlgoJiveXML.h:48
Gaudi::Property< std::string > m_AtlasRelease
Definition AlgoJiveXML.h:43
std::pair< std::string, std::string > TagType
Defines a tag as a pair of strings.
Definition DataType.h:62

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_AtlasRelease

Gaudi::Property<std::string> JiveXML::AlgoJiveXML::m_AtlasRelease {this, "AtlasRelease", "unknown", "The Athena release number"}
private

Definition at line 43 of file AlgoJiveXML.h.

43{this, "AtlasRelease", "unknown", "The Athena release number"};

◆ m_DataRetrieverTools

ToolHandleArray<JiveXML::IDataRetriever> JiveXML::AlgoJiveXML::m_DataRetrieverTools {this, "DataRetrieverTools", {}, ""}
private

The list of DataRetrievers.

This is initialised using the list of names supplied by the jobOptions. DataRetrievers are AlgTools residing in the corresponding sub-detector packages (e.g. TrackRetriever in InDetJiveXML).

Definition at line 55 of file AlgoJiveXML.h.

55{this, "DataRetrieverTools", {}, ""};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_FormatTool

ToolHandle<JiveXML::IFormatTool> JiveXML::AlgoJiveXML::m_FormatTool {this, "FormatTool", "JiveXML::XMLFormatTool/XMLFormatTool", "Format tool"}
private

Handle to the formatting tool, which is passed on to the data retrievers and converts the data into XML.

Definition at line 61 of file AlgoJiveXML.h.

61{this, "FormatTool", "JiveXML::XMLFormatTool/XMLFormatTool", "Format tool"};

◆ m_geometryVersionIn

Gaudi::Property<std::string> JiveXML::AlgoJiveXML::m_geometryVersionIn {this, "GeometryVersion", "default", "Geometry version as read from Athena"}
private

Definition at line 47 of file AlgoJiveXML.h.

47{this, "GeometryVersion", "default", "Geometry version as read from Athena"};

◆ m_GeoWriterNames

Gaudi::Property<std::vector<std::string> > JiveXML::AlgoJiveXML::m_GeoWriterNames {this, "GeoWriterNames", {"JiveXML::GeometryWriter/GeometryWriter","JiveXML::MuonGeometryWriter/MuonGeometryWriter"}, "The names of the geometry-writer tools"}
private

Definition at line 48 of file AlgoJiveXML.h.

48{this, "GeoWriterNames", {"JiveXML::GeometryWriter/GeometryWriter","JiveXML::MuonGeometryWriter/MuonGeometryWriter"}, "The names of the geometry-writer tools"};

◆ m_onlineMode

Gaudi::Property<bool> JiveXML::AlgoJiveXML::m_onlineMode {this, "OnlineMode", false, "Whether an XMLRPC server shall be started"}
private

Definition at line 45 of file AlgoJiveXML.h.

45{this, "OnlineMode", false, "Whether an XMLRPC server shall be started"};

◆ m_previousRunNumber

uint32_t JiveXML::AlgoJiveXML::m_previousRunNumber =0
private

Definition at line 70 of file AlgoJiveXML.h.

◆ m_ready4PhysicsAtStart

Gaudi::Property<bool> JiveXML::AlgoJiveXML::m_ready4PhysicsAtStart {this, "Ready4PhysicsAtStart", false, "ATLAS is ready for physics when this job was launched"}
private

Definition at line 49 of file AlgoJiveXML.h.

49{this, "Ready4PhysicsAtStart", false, "ATLAS is ready for physics when this job was launched"};

◆ m_StreamToFileTool

ToolHandle<JiveXML::IStreamTool> JiveXML::AlgoJiveXML::m_StreamToFileTool {this, "StreamToFileTool", "JiveXML::StreamToFileTool/StreamToFileTool", "Stream to file tool"}
private

Streaming tools that pass the formatted XML text into a file, to a server, etc.

Definition at line 67 of file AlgoJiveXML.h.

67{this, "StreamToFileTool", "JiveXML::StreamToFileTool/StreamToFileTool", "Stream to file tool"};

◆ m_StreamToServerTool

ToolHandle<JiveXML::IStreamTool> JiveXML::AlgoJiveXML::m_StreamToServerTool {this, "StreamToServerTool", "JiveXML::StreamServerTool/StreamToServerTool", "Stream to server tool"}
private

Definition at line 68 of file AlgoJiveXML.h.

68{this, "StreamToServerTool", "JiveXML::StreamServerTool/StreamToServerTool", "Stream to server tool"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeGeometry

Gaudi::Property<bool> JiveXML::AlgoJiveXML::m_writeGeometry {this, "WriteGeometry", false, "Whether Geometry-XML files shall be produced"}
private

Definition at line 46 of file AlgoJiveXML.h.

46{this, "WriteGeometry", false, "Whether Geometry-XML files shall be produced"};

◆ m_writeToFile

Gaudi::Property<bool> JiveXML::AlgoJiveXML::m_writeToFile {this, "WriteToFile", true, "Whether XML files shall be produced"}
private

Definition at line 44 of file AlgoJiveXML.h.

44{this, "WriteToFile", true, "Whether XML files shall be produced"};

The documentation for this class was generated from the following files: