Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
duneprototypes
duneprototypes
Coldbox
vd
Tools
VDColdboxOnlineChannel_tool.cc
Go to the documentation of this file.
1
// VDColdboxOnlineChannel.cxx
2
3
#include "
VDColdboxOnlineChannel.h
"
4
#include "
duneprototypes/Coldbox/vd/ChannelMap/VDColdboxChannelMapService.h
"
5
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
6
#include <iostream>
7
8
using
std::string
;
9
using
std::cout;
10
using
std::endl
;
11
using
Index
=
VDColdboxOnlineChannel::Index
;
12
13
//**********************************************************************
14
15
VDColdboxOnlineChannel::VDColdboxOnlineChannel
(
const
fhicl::ParameterSet
& pset)
16
: m_LogLevel(pset.
get
<
Index
>(
"LogLevel"
)) {
17
const
string
myname =
"VDColdboxOnlineChannel::ctor: "
;
18
cout << myname <<
" LogLevel: "
<<
m_LogLevel
<<
endl
;
19
}
20
21
//**********************************************************************
22
23
Index
VDColdboxOnlineChannel::get
(
Index
chanOff)
const
{
24
const
string
myname =
"VDColdboxOnlineChannel::get: "
;
25
if
( chanOff < 1600 || chanOff >= 3392 ) {
26
if
(
m_LogLevel
> 1 ) cout << myname <<
"Invalid offline channel: "
<< chanOff <<
endl
;
27
return
badIndex
();
28
}
29
art::ServiceHandle<dune::VDColdboxChannelMapService>
pms;
30
dune::VDColdboxChannelMapService::VDCBChanInfo
info
= pms->
getChanInfoFromOfflChan
(chanOff);
31
return
128*(info.
femb
) + 16*(info.
asic
-1) + info.
asicchan
;
32
}
33
34
//**********************************************************************
35
36
DEFINE_ART_CLASS_TOOL
(
VDColdboxOnlineChannel
)
dune::VDColdboxChannelMapService::VDCBChanInfo::asicchan
int asicchan
Definition:
VDColdboxChannelMapService.h:40
art::ServiceHandle
Definition:
ServiceHandle.h:37
DEFINE_ART_CLASS_TOOL
#define DEFINE_ART_CLASS_TOOL(tool)
Definition:
ToolMacros.h:42
VDColdboxOnlineChannel::get
Index get(Index chanOff) const override
Definition:
VDColdboxOnlineChannel_tool.cc:23
string
std::string string
Definition:
nybbler.cc:12
VDColdboxOnlineChannel
Definition:
VDColdboxOnlineChannel.h:27
VDColdboxChannelMapService.h
dune::VDColdboxChannelMapService::VDCBChanInfo::femb
int femb
Definition:
VDColdboxChannelMapService.h:38
Index
unsigned int Index
Definition:
sspmapmaker_v1.c:14
VDColdboxOnlineChannel::m_LogLevel
Index m_LogLevel
Definition:
VDColdboxOnlineChannel.h:40
ServiceHandle.h
dune::VDColdboxChannelMapService::VDCBChanInfo::asic
int asic
Definition:
VDColdboxChannelMapService.h:39
dune::VDColdboxChannelMapService::getChanInfoFromOfflChan
VDCBChanInfo getChanInfoFromOfflChan(int offlchan)
Definition:
VDColdboxChannelMapService_service.cc:57
generate_datataset.info
info
Definition:
generate_datataset.py:142
VDColdboxOnlineChannel::VDColdboxOnlineChannel
VDColdboxOnlineChannel(const fhicl::ParameterSet &ps)
Definition:
VDColdboxOnlineChannel_tool.cc:15
IndexMapTool::Index
unsigned int Index
Definition:
IndexMapTool.h:16
IndexMapTool::badIndex
static Index badIndex()
Definition:
IndexMapTool.h:18
art::get
auto const & get(AssnsNode< L, R, D > const &r)
Definition:
AssnsNode.h:115
VDColdboxOnlineChannel.h
dune::VDColdboxChannelMapService::VDCBChanInfo
Definition:
VDColdboxChannelMapService.h:33
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11