![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
24 #ifndef XAOD_STANDALONE
25 declareInterface<IZdcAnalysisTool>(
this);
50 return StatusCode::FAILURE;
57 return StatusCode::FAILURE;
72 std::ostringstream BCIDList;
73 BCIDList <<
"LED BCIDs:";
125 return StatusCode::SUCCESS;
165 return StatusCode::FAILURE;
168 if (moduleContainer.
size()==0)
return StatusCode::SUCCESS;
178 bool haveZdcEventInfo =
false;
180 unsigned int bcid = eventInfo->
bcid();
185 for (
auto modSum : moduleSumContainer) {
189 if (modSum->zdcSide() == 0) {
194 eventType = eventTypeHandle(*modSum);
195 DAQMode = DAQModeHandle(*modSum);
196 haveZdcEventInfo =
true;
197 moduleSumEventInfo_ptr = modSum;
200 if (!haveZdcEventInfo) {
201 ATH_MSG_ERROR(
"Zdc event data not available (moduleSum with side = 0)");
202 return StatusCode::FAILURE;
214 if (!robBCIDHandle.isValid())
return StatusCode::FAILURE;
216 const std::vector<uint16_t>& robBCIDvec = robBCIDHandle(*moduleSumEventInfo_ptr);
217 if (robBCIDHandle->size() == 0)
return StatusCode::FAILURE;
219 unsigned int checkBCID = robBCIDvec[0];
220 for (
unsigned int bcid : robBCIDvec) {
221 if (
bcid != checkBCID) {
222 ATH_MSG_ERROR(
"Inconsistent BCIDs in rob header, cannot continue in standalone mode");
223 return StatusCode::FAILURE;
256 return StatusCode::SUCCESS;
275 for (
const auto zdcModule : moduleContainer)
278 if (zdcModule->zdcType() == 0) {
281 else if (zdcModule->zdcType() == 1 && zdcModule->zdcModule() == 4) {
285 ATH_MSG_DEBUG(
"Writing aux decors to module with side, module, channel = " << zdcModule->zdcSide() <<
", " << zdcModule->zdcModule()
286 <<
", " << zdcModule->zdcChannel());
288 moduleLEDPresampleADCHandle(*zdcModule) = std::floor(
results.getPresampleADC() + 1.0e-6);
289 moduleLEDADCSumHandle(*zdcModule) =
results.getADCSum();
290 moduleLEDMaxADCHandle(*zdcModule) =
results.getMaxADC();
291 moduleLEDMaxSampleHandle(*zdcModule) =
results.getMaxSample();
292 moduleLEDAvgTimeHandle(*zdcModule) =
results.getAvgTime();
297 LEDTypeHandle(*moduleSumEventInfo_ptr) = evtLEDType;
302 return StatusCode::SUCCESS;
309 return StatusCode::FAILURE;
320 return StatusCode::SUCCESS;
330 std::vector<uint16_t> HGSamples = g1dataAcc (
module);
331 std::vector<uint16_t> LGSamples = g0dataAcc (
module);
333 std::vector<uint16_t>::const_iterator maxIter = std::max_element(HGSamples.begin(), HGSamples.end());
334 if (maxIter != HGSamples.end()) {
354 unsigned int startSample,
unsigned int endSample,
float gainScale)
358 int maxADCsub = -999;
359 unsigned int maxSample = 0;
363 ATH_MSG_ERROR(
"Start or end sample number greater than number of samples");
373 if (FADCsub > maxADCsub) {
378 avgTime +=
time*FADCsub;
386 return ZDCLEDModuleResults(preFADC, ADCSum*gainScale, maxADCsub*gainScale, maxSample, avgTime);
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
Class containing ZDC Module information.
Helper class to provide constant type-safe access to aux data.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Handle class for reading a decoration on an object.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
setEventNumber setTimeStamp bcid
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
Helper class to provide constant type-safe access to aux data.
uint32_t bcid() const
The bunch crossing ID of the event.
size_type size() const noexcept
Returns the number of elements in the collection.
Define enumerations for event-level ZDC data.