ATLAS Offline Software
Loading...
Searching...
No Matches
VP1Alg Class Reference

#include <VP1Alg.h>

Inheritance diagram for VP1Alg:
Collaboration diagram for VP1Alg:

Public Member Functions

 VP1Alg (const std::string &name, ISvcLocator *pSvcLocator)
 ~VP1Alg ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
void handle (const Incident &inc) override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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< bool > m_vp1Conf_emptyInput {this, "EmptyInput", false, "This is set to True if we start VP1 with no input, that is, no data files; that is used, for example, when using VP1 to ins[ect the detector description / geometry. Default: False"}
Gaudi::Property< std::string > m_atlasRelease {this, "AtlasRelease", "", "The current, in use Atlas release"}
Gaudi::Property< bool > m_mfOn
Gaudi::Property< int > m_mfLimit
Gaudi::Property< std::string > m_mfSourceDir
Gaudi::Property< std::string > m_mfLocalCopyDir
Gaudi::Property< std::vector< std::string > > m_mfAvailableLocalInputDirectories
Gaudi::Property< std::string > m_cruiseInitialMode
Gaudi::Property< unsigned > m_cruiseInitialUpdateSeconds {this, "CruiseInitialSeconds", 10, "Cruise mode -- Initial Cruise update time, in seconds. Default: 10"}
Gaudi::Property< std::vector< std::string > > m_initialvp1files
Gaudi::Property< bool > m_noGui
ToolHandle< Trk::IExtrapolatorm_extrapolator {this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator"}
VP1Guim_vp1gui
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Definition at line 35 of file VP1Alg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ VP1Alg()

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

Definition at line 28 of file VP1Alg.cxx.

28 :
29 AthAlgorithm(name, svcLocator),
30 m_vp1gui(0)
31{
32
33 //
34 /*
35 // This is Work In Progress
36 // Those properties are needed in VP1 configurations, which
37 // still need to be migrated to CA.
38 // See the header file for details.
39 //
40 declareProperty("InitiallyLoadedVP1Files",m_initialvp1files);
41 declareProperty("InitialCruiseMode",m_initialCruiseMode="NONE");
42 declareProperty("InitialCruiseModePeriod",m_initialCruiseSeconds=10);
43
44 declareProperty("NoGui",m_noGui=false);
45
46 // **** MF ****
47 declareProperty("MultipleFilesON",m_mfOn=false);
48 declareProperty("MFNumFileLimit",m_mfLimit=10);
49 declareProperty("MFSourceDir",m_mfSourceDir="");
50 declareProperty("MFLocalCopyDir",m_mfLocalCopyDir="");
51 declareProperty("MFAvailableLocalInputDirectories",m_mfAvailableLocalInputDirectories);
52*/
53
54 // Two ways of running in multiple files mode:
55 //
56 // 1) Source is directory on filesystem (e.g. for use in the control room).
57 // * MFSourceDir indicates the directory where files can be found.
58 // * MFLocalCopyDir indicates the temporary directory where
59 // files are copied before we tell pool to get them there.
60 // 2) Source is web directory
61 // * MFSourceDir indicates http url to small text file (to be
62 // parsed by VP1Gui/VP1EvtsOnServerInfo), with a list of
63 // available files (assumed to be in the same dir).
64 // Example value: "http://pcatdwww.cern.ch/atlas-point1/vp1events/fileinfo.txt"
65 // * MFLocalCopyDir has same meaning as before, but this time a
66 // subdirectory of it, "active_downloads", will be used to
67 // download files before they are subsequently moved to
68 // MFLocalCopyDir itself.
69
70 // **** MF ****
71
72 // Pick up patched Coin
73 ::setenv("LCGPATCH_COINMULTISELECT","1",1);
74}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
VP1Gui * m_vp1gui
Definition VP1Alg.h:81

◆ ~VP1Alg()

VP1Alg::~VP1Alg ( )

Definition at line 77 of file VP1Alg.cxx.

78{
79}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 VP1Alg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 134 of file VP1Alg.cxx.

135{
136
137 // Here you do everything that needs to be done on every single
138 // events, e.g. read input variables, apply cuts, and fill
139 // histograms and trees, if any.
140
141 msg(MSG::DEBUG) <<" in execute() " << endmsg;
142
143 if (!m_vp1gui)
144 return StatusCode::FAILURE;
145
146 if (!m_noGui&&!m_vp1gui->hasBeenInitialised()) {
147 m_vp1gui->init();//Launch!
148 }
149
150
151
152
153 unsigned int trigType = 0;
154
155 // retrieve the eventInfo object from the event store
156 const xAOD::EventInfo *eventInfo = nullptr;
157 StatusCode status = evtStore()->retrieve (eventInfo, "EventInfo");
158
159 if(status.isSuccess()) {
160 // Get run/event number:
161 const unsigned long long eventNumber = eventInfo->eventNumber();
162 const uint32_t runNumber = eventInfo->runNumber();
163 msg(MSG::DEBUG) << " Got run number = " << runNumber
164 << ", event number = " << eventNumber << endmsg;
165
166 trigType = eventInfo->level1TriggerType();
167
168 // Get time stamp:
169 uint32_t time = eventInfo->timeStamp();//0 means no info.
170
171 if (m_noGui||m_vp1gui->executeNewEvent(runNumber,eventNumber,trigType,time)) {
172 return StatusCode::SUCCESS;
173 } else {
174 msg(MSG::INFO) << " Ending application gracefully." << endmsg;
175 return StatusCode::FAILURE;
176 }
177 return StatusCode::SUCCESS;
178 }
179
180 msg(MSG::DEBUG) << " Unable to retrieve EventInfo from StoreGate... using dummy values" << endmsg;
181
182 if (m_noGui||m_vp1gui->executeNewEvent(999,999,trigType,0)) {
183 return StatusCode::SUCCESS;
184 } else {
185 msg(MSG::INFO) << " Ending application gracefully." << endmsg;
186 return StatusCode::FAILURE;
187 }
188
189 return StatusCode::SUCCESS;
190
191}
#define endmsg
ServiceHandle< StoreGateSvc > & evtStore()
Gaudi::Property< bool > m_noGui
Definition VP1Alg.h:74
uint16_t level1TriggerType() const
The Level-1 trigger type.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
time(flags, cells_name, *args, **kw)
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16
EventInfo_v1 EventInfo
Definition of the latest event info version.
setEventNumber uint32_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode VP1Alg::finalize ( )
overridevirtual

Definition at line 194 of file VP1Alg.cxx.

195{
196 msg(MSG::INFO) <<" in finalize() " << endmsg;
197
198 if (!m_vp1gui)
199 return StatusCode::FAILURE;
200
201 if (!m_noGui)
202 m_vp1gui->cleanup();
203 delete m_vp1gui;
204
205 return StatusCode::SUCCESS;
206}

◆ handle()

void VP1Alg::handle ( const Incident & inc)
override

Definition at line 209 of file VP1Alg.cxx.

210{
211 msg(MSG::INFO) << "Handling incident '" << inc.type() << "'" << endmsg;
212
213 if (!m_vp1gui) {
214 msg(MSG::INFO) << "Aborting due to null VP1Gui pointer." << endmsg;
215 return;
216 }
217
218 const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
219 if(fileInc == 0) {
220 msg(MSG::WARNING) << " Unable to cast to file incident" << endmsg;
221 return;
222 }
223 else
224 msg(MSG::DEBUG) << " Casting to file incident successful" << endmsg;
225
226 // Locate the EventSelector
227 ServiceHandle<IEvtSelector> pEvtSelector("EventSelector", this->name());
228 StatusCode sc = pEvtSelector.retrieve();
229
230 if(!sc.isSuccess() || 0 == pEvtSelector) {
231 msg(MSG::WARNING) << "Could not find EventSelector" << endmsg;
232 return;
233 }
234 else
235 msg(MSG::DEBUG) << " Got EventSelector" << endmsg;
236
237 IProperty* propertyServer = dynamic_cast<IProperty*>(pEvtSelector.operator->());
238 if (!propertyServer) {
239 msg(MSG::WARNING) << "Could not get propertyServer" << endmsg;
240 return;
241 }
242
243 std::vector<std::string> vect;
244 StringArrayProperty inputCollections("InputCollections", vect);
245
246 sc = propertyServer->getProperty(&inputCollections);
247 if(!sc.isSuccess()) {
248 msg(MSG::INFO) << "Could not get InputCollections property" << endmsg;
249 return;
250 }
251 else
252 msg(MSG::DEBUG) << " Got InputCollections property" << endmsg;
253
254 for (const std::string& s : inputCollections.value()) {
255 if(s != fileInc->fileName())
256 vect.push_back(s);
257 }
258
259 if(m_mfOn) {
260 std::string strNewFileName = m_vp1gui->nextRequestedEventFile();
261
262 if (strNewFileName.empty())
263 return;
264 if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
265 msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: "<<strNewFileName<<". Ending." << endmsg;
266 return;
267 }
268
269 vect.push_back(strNewFileName);
270 msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
271 }
272 else {
273 std::vector<std::string> strNewFileNames = m_vp1gui->userRequestedFiles();
274 for(unsigned i=0; i<strNewFileNames.size(); ++i) {
275 const std::string& strNewFileName = strNewFileNames[i];
276 if (strNewFileName.empty())
277 continue;
278 if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
279 msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: " << strNewFileName << endmsg;
280 continue;
281 }
282 vect.push_back(strNewFileName);
283 msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
284 }
285 }
286
287 StringArrayProperty newInputCollections("InputCollections", vect);
288
289 if(propertyServer->setProperty(newInputCollections)!=StatusCode::SUCCESS)
290 msg(MSG::WARNING) << "Could not set new InputCollections property" << endmsg;
291 else
292 msg(MSG::DEBUG) << " InputCollections property set" << endmsg;
293}
static Double_t sc
Gaudi::Property< bool > m_mfOn
Definition VP1Alg.h:56
static bool fileExistsAndReadable(const std::string &)

◆ initialize()

StatusCode VP1Alg::initialize ( )
overridevirtual

Definition at line 82 of file VP1Alg.cxx.

83{
84 ATH_MSG_INFO("in initialize()... ");
85
86 if ( ! m_vp1Conf_emptyInput) {
87 ATH_MSG_INFO("Checking if we have access to the Extrapolator tool...");
88 ATH_CHECK(m_extrapolator.retrieve( DisableTool{m_extrapolator.empty()} ));
89 if (m_extrapolator.empty()) {
90 ATH_MSG_WARNING("No extrapolator found. Will not be able to extrapolate tracks.");
91 } else {
92 ATH_MSG_INFO("Extrapolator found. Will be able to extrapolate tracks.");
93 }
94 } else {
95 ATH_MSG_INFO("VP1 has been started with no input data files; so we don't need to retrieve the Extrapolator tool.");
96 }
97
98 std::vector<std::string>::iterator it, itE = m_initialvp1files.end();
99 for (it = m_initialvp1files.begin();it!=itE;++it) {
100 std::string file = PathResolver::find_file (*it, "DATAPATH");
101 if (file=="")
102 file = PathResolver::find_file (*it+".vp1", "DATAPATH");
103 if (file!="")
104 *it = std::move(file);
105 }
106
107 // use the incident service to register a handler
108 SmartIF<IIncidentSvc> incsvc{service("IncidentSvc")};
109 ATH_CHECK( incsvc.isValid() );
110
111 std::string endfilekey("EndTagFile");
112 incsvc->addListener(this, endfilekey, 0);
113 msg(MSG::DEBUG) << "Added listener on "<<endfilekey << endmsg;
114
115 //Create VP1 gui object and see if it considers settings to be valid.
116 m_vp1gui = new VP1Gui(&(*evtStore()),&(*detStore()),serviceLocator(),toolSvc(),
120 (m_mfOn ? m_mfSourceDir.value() : ""),
121 (m_mfOn ? m_mfLocalCopyDir.value() : ""),
122 m_mfLimit,
123 ( m_mfOn ? m_mfAvailableLocalInputDirectories : Gaudi::Property<std::vector<std::string>>() ) );
124 if (!m_vp1gui->argumentsAreValid()) {
125 delete m_vp1gui;
126 m_vp1gui = 0;
127 exit(1);//Should we do this? It is kind of nice to not have to dig through the logfile to find the failure.
128 return StatusCode::FAILURE;
129 }
130 return StatusCode::SUCCESS;
131}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
const ServiceHandle< StoreGateSvc > & detStore() const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Gaudi::Property< std::string > m_mfLocalCopyDir
Definition VP1Alg.h:62
Gaudi::Property< int > m_mfLimit
Definition VP1Alg.h:58
Gaudi::Property< std::string > m_cruiseInitialMode
Definition VP1Alg.h:67
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition VP1Alg.h:78
Gaudi::Property< bool > m_vp1Conf_emptyInput
Definition VP1Alg.h:52
Gaudi::Property< std::vector< std::string > > m_initialvp1files
Definition VP1Alg.h:71
Gaudi::Property< unsigned > m_cruiseInitialUpdateSeconds
Definition VP1Alg.h:69
Gaudi::Property< std::vector< std::string > > m_mfAvailableLocalInputDirectories
Definition VP1Alg.h:64
Gaudi::Property< std::string > m_mfSourceDir
Definition VP1Alg.h:60
TFile * file

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

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

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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 }

Member Data Documentation

◆ m_atlasRelease

Gaudi::Property<std::string> VP1Alg::m_atlasRelease {this, "AtlasRelease", "", "The current, in use Atlas release"}
private

Definition at line 54 of file VP1Alg.h.

54{this, "AtlasRelease", "", "The current, in use Atlas release"};

◆ m_cruiseInitialMode

Gaudi::Property<std::string> VP1Alg::m_cruiseInitialMode
private
Initial value:
{this, "CruiseInitialMode", "NONE",
"Cruise mode -- Initial Cruise mode: 'NONE', 'EVENT', 'TAB', 'BOTH'. Default: 'NONE'"}

Definition at line 67 of file VP1Alg.h.

67 {this, "CruiseInitialMode", "NONE",
68 "Cruise mode -- Initial Cruise mode: 'NONE', 'EVENT', 'TAB', 'BOTH'. Default: 'NONE'"};

◆ m_cruiseInitialUpdateSeconds

Gaudi::Property<unsigned> VP1Alg::m_cruiseInitialUpdateSeconds {this, "CruiseInitialSeconds", 10, "Cruise mode -- Initial Cruise update time, in seconds. Default: 10"}
private

Definition at line 69 of file VP1Alg.h.

69{this, "CruiseInitialSeconds", 10, "Cruise mode -- Initial Cruise update time, in seconds. Default: 10"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> VP1Alg::m_extrapolator {this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator"}
private

Definition at line 78 of file VP1Alg.h.

78{this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator"};

◆ m_initialvp1files

Gaudi::Property<std::vector<std::string> > VP1Alg::m_initialvp1files
private
Initial value:
{
this, "InitialInputVP1Files", {}, "a vector of input VP1 files"}

Definition at line 71 of file VP1Alg.h.

71 {
72 this, "InitialInputVP1Files", {}, "a vector of input VP1 files"};

◆ m_mfAvailableLocalInputDirectories

Gaudi::Property<std::vector<std::string> > VP1Alg::m_mfAvailableLocalInputDirectories
private
Initial value:
{this, "MFAvailableLocalInputDirectories", {},
"MultipleFiles mode -- Will only be used if sourcedir is set and local"}

Definition at line 64 of file VP1Alg.h.

64 {this, "MFAvailableLocalInputDirectories", {},
65 "MultipleFiles mode -- Will only be used if sourcedir is set and local"};

◆ m_mfLimit

Gaudi::Property<int> VP1Alg::m_mfLimit
private
Initial value:
{this, "MFNumFileLimit", 10,
"MultipleFiles mode -- Maximum number of local copies to keep"}

Definition at line 58 of file VP1Alg.h.

58 {this, "MFNumFileLimit", 10,
59 "MultipleFiles mode -- Maximum number of local copies to keep"};

◆ m_mfLocalCopyDir

Gaudi::Property<std::string> VP1Alg::m_mfLocalCopyDir
private
Initial value:
{this, "MFLocalCopyDir", ".",
"MultipleFiles mode -- Path of the directory to keep local copies of processed events. Default '.' (the local run folder)"}

Definition at line 62 of file VP1Alg.h.

62 {this, "MFLocalCopyDir", ".",
63 "MultipleFiles mode -- Path of the directory to keep local copies of processed events. Default '.' (the local run folder)"};

◆ m_mfOn

Gaudi::Property<bool> VP1Alg::m_mfOn
private
Initial value:
{this, "MultipleFilesON", false,
"Flag to turn the 'Multiple Files' mode ON/OFF. Default OFF"}

Definition at line 56 of file VP1Alg.h.

56 {this, "MultipleFilesON", false,
57 "Flag to turn the 'Multiple Files' mode ON/OFF. Default OFF"};

◆ m_mfSourceDir

Gaudi::Property<std::string> VP1Alg::m_mfSourceDir
private
Initial value:
{this, "MFSourceDir", "",
"MultipleFiles mode -- Path of the source directory, where input data files are stored and from which events are taken from"}

Definition at line 60 of file VP1Alg.h.

60 {this, "MFSourceDir", "",
61 "MultipleFiles mode -- Path of the source directory, where input data files are stored and from which events are taken from"};

◆ m_noGui

Gaudi::Property<bool> VP1Alg::m_noGui
private
Initial value:
{this, "noGUI", false,
"Flag to turn OFF the GUI. Default: FALSE (i.e., GUI is ON)"}

Definition at line 74 of file VP1Alg.h.

74 {this, "noGUI", false,
75 "Flag to turn OFF the GUI. Default: FALSE (i.e., GUI is ON)"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vp1Conf_emptyInput

Gaudi::Property<bool> VP1Alg::m_vp1Conf_emptyInput {this, "EmptyInput", false, "This is set to True if we start VP1 with no input, that is, no data files; that is used, for example, when using VP1 to ins[ect the detector description / geometry. Default: False"}
private

Definition at line 52 of file VP1Alg.h.

52{this, "EmptyInput", false, "This is set to True if we start VP1 with no input, that is, no data files; that is used, for example, when using VP1 to ins[ect the detector description / geometry. Default: False"};

◆ m_vp1gui

VP1Gui* VP1Alg::m_vp1gui
private

Definition at line 81 of file VP1Alg.h.


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