CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
RawDataFEDSelector Class Reference

#include <RawDataFEDSelector.h>

Public Member Functions

 RawDataFEDSelector ()
 Constructor. More...
 
std::auto_ptr
< FEDRawDataCollection
select (const edm::Handle< FEDRawDataCollection > &rawData)
 
std::auto_ptr
< FEDRawDataCollection
select (const edm::Handle< FEDRawDataCollection > &rawData, const std::pair< int, int > &range)
 
std::auto_ptr
< FEDRawDataCollection
select (const edm::Handle< FEDRawDataCollection > &rawData, const std::vector< int > &list)
 
void setRange (const std::pair< int, int > &range)
 
void setRange (const std::vector< int > &list)
 
virtual ~RawDataFEDSelector ()
 Destructor. More...
 

Private Attributes

std::vector< int > fedList
 
std::pair< int, int > fedRange
 

Detailed Description

Author
M. Zanetti CERN

Definition at line 18 of file RawDataFEDSelector.h.

Constructor & Destructor Documentation

RawDataFEDSelector::RawDataFEDSelector ( )
inline

Constructor.

Definition at line 23 of file RawDataFEDSelector.h.

23 {};
virtual RawDataFEDSelector::~RawDataFEDSelector ( )
inlinevirtual

Destructor.

Definition at line 26 of file RawDataFEDSelector.h.

26 {};

Member Function Documentation

auto_ptr< FEDRawDataCollection > RawDataFEDSelector::select ( const edm::Handle< FEDRawDataCollection > &  rawData)

Definition at line 18 of file RawDataFEDSelector.cc.

References FEDRawData::data(), HLT_Fake1_cff::fedList, i, FEDNumbering::lastFEDId(), FEDRawData::resize(), FEDRawData::size(), and findQualityFiles::size.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), RawDataSelector::produce(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().

18  {
19 
20  auto_ptr<FEDRawDataCollection> selectedRawData(new FEDRawDataCollection);
21 
22  // if vector of FED indexes is defined, loop over it
23  if (fedList.size()) {
24  vector<int>::const_iterator it = fedList.begin();
25  vector<int>::const_iterator itEnd = fedList.end();
26  for (;it != itEnd; ++it) {
27 
28  const FEDRawData & fedData = rawData->FEDData(*it);
29  size_t size=fedData.size();
30 
31  FEDRawData & fedDataProd = selectedRawData->FEDData(*it);
32  fedDataProd.resize(size);
33 
34  memcpy(fedDataProd.data(),fedData.data(),size);
35  }
36  }
37 
38  // if vector of FED indexes is NOT defined, loop over it FED range
39  else {
40 
41  // FED range is <0,0> (i.e. neither the list nor the rage are defined) copy the entire payload
42  if (fedRange.second==0) setRange(pair<int,int>(0,FEDNumbering::lastFEDId()));
43 
44  for (int i = fedRange.first; i <= fedRange.second; ++i) {
45 
46  const FEDRawData & fedData = rawData->FEDData(i);
47  size_t size=fedData.size();
48 
49  FEDRawData & fedDataProd = selectedRawData->FEDData(i);
50  fedDataProd.resize(size);
51 
52  memcpy(fedDataProd.data(),fedData.data(),size);
53  }
54  }
55 
56  return selectedRawData;
57 }
int i
Definition: DBlmapReader.cc:9
void setRange(const std::pair< int, int > &range)
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
std::pair< int, int > fedRange
void resize(size_t newsize)
Definition: FEDRawData.cc:32
static int lastFEDId()
Definition: FEDNumbering.cc:17
std::vector< int > fedList
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
tuple size
Write out results.
auto_ptr< FEDRawDataCollection > RawDataFEDSelector::select ( const edm::Handle< FEDRawDataCollection > &  rawData,
const std::pair< int, int > &  range 
)
auto_ptr< FEDRawDataCollection > RawDataFEDSelector::select ( const edm::Handle< FEDRawDataCollection > &  rawData,
const std::vector< int > &  list 
)

Definition at line 66 of file RawDataFEDSelector.cc.

References benchmark_cfg::select.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().

67  {
68  setRange(list);
69  return select(rawData);
70 }
void setRange(const std::pair< int, int > &range)
std::auto_ptr< FEDRawDataCollection > select(const edm::Handle< FEDRawDataCollection > &rawData)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void RawDataFEDSelector::setRange ( const std::pair< int, int > &  range)
inline

Definition at line 28 of file RawDataFEDSelector.h.

References fedRange.

28 {fedRange = range;};
std::pair< int, int > fedRange
void RawDataFEDSelector::setRange ( const std::vector< int > &  list)
inline

Definition at line 29 of file RawDataFEDSelector.h.

References fedList, and list().

29 {fedList = list;};
std::vector< int > fedList
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Data Documentation

std::vector<int> RawDataFEDSelector::fedList
private

Definition at line 39 of file RawDataFEDSelector.h.

Referenced by setRange().

std::pair<int,int> RawDataFEDSelector::fedRange
private

Definition at line 38 of file RawDataFEDSelector.h.

Referenced by setRange().