Project
Loading...
Searching...
No Matches
Constants.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#include <iostream>
13
14std::ostream& o2::emcal::operator<<(std::ostream& stream, o2::emcal::ChannelType_t chantype)
15{
17 return stream;
18};
19
21{
22 std::string typestring;
23 switch (chantype) {
25 typestring = "high gain";
26 break;
28 typestring = "low gain";
29 break;
31 typestring = "tru";
32 break;
34 typestring = "LEDmon";
35 break;
36 };
37 return typestring;
38}
39
41{
42 switch (chantype) {
44 return 1;
46 return 0;
48 return 2;
50 return 3;
51 };
52 throw o2::emcal::InvalidChanneltypeException(int(chantype));
53}
54
56{
57 switch (chantype) {
58 case 0:
60 case 1:
62 case 2:
64 case 3:
66 };
68}
Error handling invalid channel types.
Definition Constants.h:43
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
std::string channelTypeToString(ChannelType_t chantype)
Create string representation of the channel type object.
Definition Constants.cxx:20
ChannelType_t intToChannelType(int chantype)
Convert integer number to channel type object.
Definition Constants.cxx:55
ChannelType_t
Type of a raw data channel.
Definition Constants.h:33
@ TRU
TRU channel.
Definition Constants.h:36
@ HIGH_GAIN
High gain channel.
Definition Constants.h:35
@ LOW_GAIN
Low gain channel.
Definition Constants.h:34
@ LEDMON
LED monitor channel.
Definition Constants.h:37
int channelTypeToInt(ChannelType_t chantype)
integer representation of the channel type object
Definition Constants.cxx:40