16 m_ntpath =
"/NTUPLES/FILE1/LARDIGITS";
30 ATH_MSG_FATAL(
"Could not run with both standard and acc. digits !!!");
32 return StatusCode::FAILURE;
38 if (
sc!=StatusCode::SUCCESS) {
45 if (
sc!=StatusCode::SUCCESS) {
50 if (
sc!=StatusCode::SUCCESS) {
56 if (
sc!=StatusCode::SUCCESS) {
61 if (
sc!=StatusCode::SUCCESS) {
66 if (
sc!=StatusCode::SUCCESS) {
75 if (
sc!=StatusCode::SUCCESS) {
82 if (
sc!=StatusCode::SUCCESS) {
89 if (
sc!=StatusCode::SUCCESS) {
96 if (
sc!=StatusCode::SUCCESS) {
103 if (
sc!=StatusCode::SUCCESS) {
116 return StatusCode::FAILURE;
122 if (
sc!=StatusCode::SUCCESS) {
128 if (
sc.isFailure()) {
141 return StatusCode::SUCCESS;
148 const EventContext& ctx = Gaudi::Hive::currentContext();
155 unsigned long long thisevent;
156 unsigned long thisbcid = 0;
157 unsigned long thisELVL1Id = 0;
159 thisevent = ctx.eventID().event_number();
169 if(
m_fillBCID) thisbcid = (*hdrCont->begin())->BCId() ;
171 thisELVL1Id = (*hdrCont->begin())->ELVL1Id();
172 ATH_MSG_DEBUG(
"NSAMPLES FROM FEB HEADER " << (*hdrCont->begin())->NbSamples() );
176 thisbcid = ctx.eventID().bunch_crossing_id();
183 return StatusCode::SUCCESS;
189 if(!hdlDigit.
cptr()) {
191 return StatusCode::SUCCESS;
194 for(
const LArDigit *digi : DigitContainer ){
200 unsigned int trueMaxSample = digi->nsamples();
208 ATH_MSG_WARNING(
"The number of digi samples in data is larger than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " <<
m_Nsamples <<
" will be available in the ntuple " );
215 ATH_MSG_WARNING(
"The number of digi samples in data is lower than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " << trueMaxSample <<
" will be available in the ntuple " );
251 for(
unsigned i = 0; i<trueMaxSample;++i)
m_samples[i] = digi->samples().at(i);
262 return StatusCode::SUCCESS;
268 if(!hdlDigit.
cptr()) {
270 return StatusCode::SUCCESS;
279 unsigned int trueMaxSample = digi->nsamples();
287 ATH_MSG_WARNING(
"The number of digi samples in data is larger than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " <<
m_Nsamples <<
" will be available in the ntuple " );
294 ATH_MSG_WARNING(
"The number of digi samples in data is lower than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " << trueMaxSample <<
" will be available in the ntuple " );
317 for(
unsigned i = 0; i<trueMaxSample;++i) {
318 m_mean[i] = digi->mean(i);
319 m_RMS[i] = digi->RMS(i);
335 return StatusCode::SUCCESS;
341 if(!hdlDigit.
cptr()) {
343 return StatusCode::SUCCESS;
352 unsigned int trueMaxSample = digi->nsample();
361 ATH_MSG_WARNING(
"The number of digi samples in data is larger than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " <<
m_Nsamples <<
" will be available in the ntuple " );
367 ATH_MSG_WARNING(
"The number of digi samples in data is lower than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " << trueMaxSample <<
" will be available in the ntuple " );
390 for(
unsigned i = 0; i<trueMaxSample;++i) {
391 m_mean[i] = digi->mean(i);
392 m_RMS[i] = digi->RMS(i);
401 m_LB = ctx.eventID().lumi_block();
404 if (
sc != StatusCode::SUCCESS) {
411 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Container class for LArAccumulatedCalibDigit.
Data class for calibration ADC samples preprocessed by the DSP.
Container class for LArAccumulatedDigit.
Data class for ADC samples and autocorr preprocessed by the DSP.
Gaudi::Property< bool > m_isSC
NTuple::Item< long > m_barrel_ec
NTuple::Item< long > m_FT
NTuple::Item< long > m_slot
NTuple::Item< long > m_pos_neg
bool fillFromIdentifier(const HWIdentifier &id)
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
Container class for LArDigit.
Liquid Argon digit base class.
NTuple::Array< short > m_samples
Gaudi::Property< bool > m_fillLB
Gaudi::Property< bool > m_fillBCID
NTuple::Item< unsigned int > m_delay
SG::ReadHandleKey< LArDigitContainer > m_contKey
NTuple::Array< float > m_RMS
NTuple::Item< short > m_LB
Gaudi::Property< std::vector< unsigned int > > m_BElist
LArDigits2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::vector< unsigned int > > m_Slotlist
NTuple::Array< float > m_mean
Gaudi::Property< std::vector< unsigned int > > m_Sidelist
Gaudi::Property< std::vector< unsigned int > > m_FTlist
SG::ReadHandleKey< LArFebHeaderContainer > m_LArFebHeaderContainerKey
Gaudi::Property< unsigned int > m_Nsamples
NTuple::Item< long > m_ntNsamples
Gaudi::Property< bool > m_fillEMB
NTuple::Item< short > m_bcid
virtual StatusCode execute()
NTuple::Item< unsigned long long > m_IEvent
SG::ReadHandleKey< LArAccumulatedDigitContainer > m_accContKey
NTuple::Item< unsigned long > m_ELVL1Id
virtual StatusCode initialize()
NTuple::Item< unsigned int > m_pulsed
Gaudi::Property< bool > m_fillEndcap
SG::ReadHandleKey< LArAccumulatedCalibDigitContainer > m_accCalibContKey
NTuple::Item< short > m_gain
NTuple::Item< unsigned long long > m_IEventEvt
NTuple::Item< unsigned int > m_dac
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.