7 #ifndef RawDigitAna_module
8 #define RawDigitAna_module
20 #include "cetlib/cpu_timer.h"
27 #include "art/Framework/Core/EDAnalyzer.h"
28 #include "art/Framework/Principal/Event.h"
29 #include "art/Framework/Principal/Handle.h"
30 #include "art/Framework/Principal/View.h"
31 #include "art/Framework/Services/Registry/ServiceHandle.h"
32 #include "art_root_io/TFileService.h"
33 #include "art/Framework/Core/ModuleMacros.h"
34 #include "art/Utilities/make_tool.h"
35 #include "canvas/Utilities/InputTag.h"
36 #include "canvas/Persistency/Common/FindManyP.h"
37 #include "messagefacility/MessageLogger/MessageLogger.h"
38 #include "fhiclcpp/ParameterSet.h"
39 #include "cetlib_except/exception.h"
66 explicit RawDigitAna(fhicl::ParameterSet
const& pset);
77 void beginRun(
const art::Run& run)
override;
118 : EDAnalyzer(parameterSet),
119 fPedestalRetrievalAlg(*lar::
providerFrom<lariov::DetPedestalService>())
122 fGeometry = lar::providerFrom<geo::Geometry>();
130 RawDigitAna::~RawDigitAna()
134 void RawDigitAna::beginJob()
142 art::ServiceHandle<art::TFileService>
tfs;
147 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
148 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob(clockData);
156 void RawDigitAna::beginRun(
const art::Run& )
170 fRawDigitProducerLabelVec = p.get< std::vector<art::InputTag> >(
"RawDigitModuleLabel", std::vector<art::InputTag>() = {
"rawdigitfilter"});
174 const std::vector<fhicl::ParameterSet>& rawDigitHistogramToolVec = p.get<std::vector<fhicl::ParameterSet>>(
"RawDigitHistogramToolList");
176 for(
auto& rawDigitHistogramTool : rawDigitHistogramToolVec)
186 fEvent =
event.id().event();
192 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(event);
193 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(event, clockData);
199 art::Handle< std::vector<raw::RawDigit> > rawDigitHandle;
200 event.getByLabel(rawDigitLabel, rawDigitHandle);
204 art::Handle<std::vector<sim::SimChannel>> simChannelHandle;
211 if (simChannelHandle.isValid())
213 for(
const auto& simChannel : *simChannelHandle) channelMap[simChannel.Channel()] = &simChannel;
216 if (rawDigitHandle.isValid())
219 art::fill_ptr_vector(allRawDigitVec, rawDigitHandle);
228 void RawDigitAna::endJob()
242 #endif // RawDigitAna_module
std::vector< art::InputTag > fRawDigitProducerLabelVec
process_name opflashCryo1 flashfilter analyze
const geo::GeometryCore * fGeometry
Utilities related to art service access.
T::provider_type const * providerFrom()
Returns a constant pointer to the provider of specified service.
const lariov::DetPedestalProvider & fPedestalRetrievalAlg
Keep track of an instance to the pedestal retrieval alg.
Definition of basic raw digits.
std::vector< std::vector< double > > fChannelPedVec
void beginRun(const art::Run &run) override
art::InputTag fSimChannelProducerLabel
std::vector< std::unique_ptr< IRawDigitHistogramTool > > fRawDigitHistogramToolVec
RawDigitAna(fhicl::ParameterSet const &pset)
Collect all the RawData header files together.
void analyze(const art::Event &evt) override
Description of geometry of one entire detector.
void reconfigure(fhicl::ParameterSet const &pset)
Definition of data types for geometry description.
art::ServiceHandle< art::TFileService > tfs
art framework interface to geometry description