JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwCombiner.h
Go to the documentation of this file.
1/*!
2 * \file QwCombiner.h
3 * \brief Data combiner handler for channel operations
4 * \author wdconinc
5 * \date 2010-10-22
6 */
7
8#pragma once
9
10// Parent Class
11#include "VQwDataHandler.h"
12
13/**
14 * \class QwCombiner
15 * \ingroup QwAnalysis
16 * \brief Data handler that forms linear combinations of channels
17 *
18 * QwCombiner connects to one or more input variables (yields/asymmetries/
19 * differences) and computes configured linear combinations using provided
20 * sensitivities. It is typically used to derive composite diagnostics or to
21 * prepare inputs for higher-level analyses.
22 */
23class QwCombiner:public VQwDataHandler, public MQwDataHandlerCloneable<QwCombiner>
24{
25 public:
26 typedef std::vector< VQwHardwareChannel* >::iterator Iterator_HdwChan;
27 typedef std::vector< VQwHardwareChannel* >::const_iterator ConstIterator_HdwChan;
28
29 public:
30 /// \brief Constructor with name
31 QwCombiner(const TString& name);
32
33 /// \brief Copy constructor
34 QwCombiner(const QwCombiner &source);
35 /// Virtual destructor
36 ~QwCombiner() override;
37
38 /// \brief Load the channels and sensitivities
39 Int_t LoadChannelMap(const std::string& mapfile) override;
40
41 /// \brief Connect to Channels (event only)
42 /// \param event Subsystem array with per-MPS yields
43 /// \return 0 on success, non-zero on failure
44 Int_t ConnectChannels(QwSubsystemArrayParity& event) override;
45 /// \brief Connect to Channels (asymmetry/difference only)
46 /// \param asym Subsystem array with asymmetries
47 /// \param diff Subsystem array with differences
48 /// \return 0 on success, non-zero on failure
50 QwSubsystemArrayParity& diff) override;
51
52 void ProcessData() override;
53
54 protected:
55
56 /// Default constructor (Protected for child class access)
58
59 /// Error flag mask
61 const UInt_t* fErrorFlagPointer;
62
63 /// List of channels to use in the combiner
64 std::vector< std::vector< EQwHandleType > > fIndependentType;
65 std::vector< std::vector< std::string > > fIndependentName;
66 std::vector< std::vector< const VQwHardwareChannel* > > fIndependentVar;
67 std::vector< std::vector< Double_t > > fSensitivity;
68
69
70}; // class QwCombiner
71
72inline std::ostream& operator<< (std::ostream& stream, const QwCombiner::EQwHandleType& i) {
73 switch (i){
74 case QwCombiner::kHandleTypeMps: stream << "mps"; break;
75 case QwCombiner::kHandleTypeAsym: stream << "asym"; break;
76 case QwCombiner::kHandleTypeDiff: stream << "diff"; break;
77 default: stream << "Unknown";
78 }
79 return stream;
80}
Virtual base class for data handlers accessing multiple subsystems.
std::ostream & operator<<(std::ostream &stream, const QwCombiner::EQwHandleType &i)
Definition QwCombiner.h:72
std::vector< std::vector< std::string > > fIndependentName
Definition QwCombiner.h:65
QwCombiner(const TString &name)
Constructor with name.
Definition QwCombiner.cc:28
std::vector< std::vector< Double_t > > fSensitivity
Definition QwCombiner.h:67
std::vector< VQwHardwareChannel * >::const_iterator ConstIterator_HdwChan
Definition QwCombiner.h:27
const UInt_t * fErrorFlagPointer
Definition QwCombiner.h:61
void ProcessData() override
Int_t ConnectChannels(QwSubsystemArrayParity &event) override
Connect to Channels (event only)
std::vector< std::vector< const VQwHardwareChannel * > > fIndependentVar
Definition QwCombiner.h:66
std::vector< VQwHardwareChannel * >::iterator Iterator_HdwChan
Definition QwCombiner.h:26
~QwCombiner() override
Virtual destructor.
Definition QwCombiner.cc:45
QwCombiner()
Default constructor (Protected for child class access)
Definition QwCombiner.h:57
UInt_t fErrorFlagMask
Error flag mask.
Definition QwCombiner.h:60
std::vector< std::vector< EQwHandleType > > fIndependentType
List of channels to use in the combiner.
Definition QwCombiner.h:64
Subsystem array container specialized for parity analysis with asymmetry calculations.
VQwDataHandler(const TString &name)