Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MergeTBDaqCollections::MergeTBDaqCollections Class Reference
Inheritance diagram for MergeTBDaqCollections::MergeTBDaqCollections:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 MergeTBDaqCollections (fhicl::ParameterSet const &pset)
 
virtual ~MergeTBDaqCollections ()
 
void produce (art::Event &evt)
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Protected Attributes

std::string fFirstDaqCollection
 
std::string fSecondDaqCollection
 Label on the FEBv4 collection. More...
 
std::string fInstanceLabel
 Label on the FEBv5 collection. More...
 

Detailed Description

Definition at line 32 of file MergeTBDaqCollections_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

MergeTBDaqCollections::MergeTBDaqCollections::MergeTBDaqCollections ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 51 of file MergeTBDaqCollections_module.cc.

51  :
52  fFirstDaqCollection (pset.get< std::string >("FirstDaqCollection")),
53  fSecondDaqCollection (pset.get< std::string >("SecondDaqCollection")),
54  fInstanceLabel (pset.get< std::string >("InstanceLabel"))
55  {
56  produces< std::vector<rawdata::RawDigit> >(fInstanceLabel);
57  produces< std::vector<rawdata::RawTrigger> >(fInstanceLabel);
58  }
std::string fSecondDaqCollection
Label on the FEBv4 collection.
std::string fInstanceLabel
Label on the FEBv5 collection.
enum BeamMode string
MergeTBDaqCollections::MergeTBDaqCollections::~MergeTBDaqCollections ( )
virtual

Definition at line 61 of file MergeTBDaqCollections_module.cc.

62  {
63  }

Member Function Documentation

template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDProducer::currentContext ( ) const
protectedinherited
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

Referenced by skim::NueSkimmer::CopyMichelSlice(), and skim::NueSkimmer::CopyMichelTrack().

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID(), and string.

41  {
42  return true;
43  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void MergeTBDaqCollections::MergeTBDaqCollections::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 66 of file MergeTBDaqCollections_module.cc.

References visualisationForPaperMasterPlot::cmap, rawdata::RawDigit::DaqChannel(), febshutoff_auto::dcm, DEFINE_ART_MODULE(), art::DataViewImpl::getByLabel(), daqchannelmap::DAQChannelMap::getDCM(), MECModelEnuComparisons::i, cmap::dataprov::CMap::Map(), and art::Event::put().

67  {
69 
70  std::unique_ptr< std::vector<rawdata::RawDigit> > digitcol (new std::vector<rawdata::RawDigit>);
71  std::unique_ptr< std::vector<rawdata::RawTrigger> > triggercol (new std::vector<rawdata::RawTrigger>);
72 
74  evt.getByLabel(fFirstDaqCollection, digitv4list);
75 
77  evt.getByLabel(fSecondDaqCollection, digitv5list);
78 
79 
80  // First Collection Digits
81  for(unsigned int i = 0; i < digitv4list->size(); ++i){
82  rawdata::RawDigit digit ((*digitv4list)[i]);
83  const uint32_t dcm = cmap->Map()->getDCM(digit.DaqChannel());
84  if ( dcm!=3 ) {
85  digitcol->push_back(digit);
86  }
87  }
88 
89  // Second Collection Digits
90  for(unsigned int i = 0; i < digitv5list->size(); ++i){
91  rawdata::RawDigit digit ((*digitv5list)[i]);
92  const uint32_t dcm = cmap->Map()->getDCM(digit.DaqChannel());
93  if ( dcm==3 ) {
94  digitcol->push_back(digit);
95  }
96  }
97 
98  // Just copy v4 trigger into event. Needed in this file to rename with correct module label.
100  evt.getByLabel(fFirstDaqCollection, triggerlist);
101  for (unsigned int i = 0; i < triggerlist->size(); ++i) {
102  rawdata::RawTrigger trigger ((*triggerlist)[i]);
103  triggercol->push_back(trigger);
104  }
105 
106  // put the collections in the event
107  evt.put(std::move(digitcol), fInstanceLabel);
108  evt.put(std::move(triggercol), fInstanceLabel);
109 
110  }
std::string fSecondDaqCollection
Label on the FEBv4 collection.
const daqchannelmap::DAQChannelMap * Map() const
Definition: CMap.h:57
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
std::string fInstanceLabel
Label on the FEBv5 collection.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
dcm_id_t getDCM(dchan daqchan) const
Decode the dcm ID from a dchan.
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Member Data Documentation

std::string MergeTBDaqCollections::MergeTBDaqCollections::fFirstDaqCollection
protected

Definition at line 43 of file MergeTBDaqCollections_module.cc.

std::string MergeTBDaqCollections::MergeTBDaqCollections::fInstanceLabel
protected

Label on the FEBv5 collection.

Definition at line 46 of file MergeTBDaqCollections_module.cc.

std::string MergeTBDaqCollections::MergeTBDaqCollections::fSecondDaqCollection
protected

Label on the FEBv4 collection.

Definition at line 44 of file MergeTBDaqCollections_module.cc.


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