Skip to content

Commit

Permalink
Revert "#3"
Browse files Browse the repository at this point in the history
This reverts commit c0a713e.
  • Loading branch information
mikejiang committed Jan 12, 2018
1 parent c0a713e commit 591e906
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
12 changes: 5 additions & 7 deletions inst/include/cytolib/GatingHierarchy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ struct OurVertexPropertyWriterR {

class GatingHierarchy{
private:
unsigned short g_loglevel;// debug print is turned off by default

compensation comp; /*< compensation object */

/* compensation is currently done in R due to the linear Algebra
Expand All @@ -106,7 +104,7 @@ class GatingHierarchy{

public:

void set_loglevel(unsigned short _g_loglevel){g_loglevel = _g_loglevel;};


/**
* load the in-memory copy of frm
Expand Down Expand Up @@ -340,7 +338,7 @@ class GatingHierarchy{
* , customized copy and assignment constructor is required
*
*/
GatingHierarchy(const GatingHierarchy & _gh):g_loglevel(NO_LOG)
GatingHierarchy(const GatingHierarchy & _gh)
{
comp = _gh.comp;

Expand All @@ -367,8 +365,8 @@ class GatingHierarchy{
* GatingHierarchy *curGh=new GatingHierarchy();
* \endcode
*/
GatingHierarchy():g_loglevel(NO_LOG){}
GatingHierarchy(compensation _comp, PARAM_VEC _transFlag, trans_local _trans):g_loglevel(NO_LOG),comp(_comp), transFlag(_transFlag),trans(_trans) {};
GatingHierarchy(){}
GatingHierarchy(compensation _comp, PARAM_VEC _transFlag, trans_local _trans):comp(_comp), transFlag(_transFlag),trans(_trans) {};
void convertToPb(pb::GatingHierarchy & gh_pb){
pb::populationTree * ptree = gh_pb.mutable_tree();
/*
Expand Down Expand Up @@ -404,7 +402,7 @@ class GatingHierarchy{

}

GatingHierarchy(pb::GatingHierarchy & pb_gh, map<intptr_t, transformation *> & trans_tbl):g_loglevel(NO_LOG){
GatingHierarchy(pb::GatingHierarchy & pb_gh, map<intptr_t, transformation *> & trans_tbl){
const pb::populationTree & tree_pb = pb_gh.tree();
int nNodes = tree_pb.node_size();

Expand Down
16 changes: 4 additions & 12 deletions inst/include/cytolib/GatingSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ using namespace std;
*
*/
class GatingSet{
unsigned short g_loglevel;// debug print is turned off by default

biexpTrans globalBiExpTrans; //default bi-exponential transformation functions
linTrans globalLinTrans;
Expand All @@ -53,13 +52,6 @@ class GatingSet{
return ghs.find(sampleName);
}
size_t erase ( const string& k ){return ghs.erase(k);}

void set_loglevel(unsigned short _g_loglevel){
g_loglevel = _g_loglevel;
for(auto & it :ghs)
it.second.set_loglevel(_g_loglevel);
};
unsigned short get_loglevel(){return g_loglevel;};
/**
* insert
* @param sampleName
Expand Down Expand Up @@ -130,7 +122,7 @@ class GatingSet{

}

GatingSet():g_loglevel(NO_LOG){};
GatingSet(){};

/**
* separate filename from dir to avoid to deal with path parsing in c++
Expand Down Expand Up @@ -212,7 +204,7 @@ class GatingSet{
* @param format
* @param isPB
*/
GatingSet(string filename):g_loglevel(NO_LOG)
GatingSet(string filename)
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
ifstream input(filename.c_str(), ios::in | ios::binary);
Expand Down Expand Up @@ -431,7 +423,7 @@ class GatingSet{
* compensation and transformation,more options can be allowed in future like providing different
* comp and trans
*/
GatingSet(const GatingHierarchy & gh_template,vector<string> sampleNames):g_loglevel(NO_LOG){
GatingSet(const GatingHierarchy & gh_template,vector<string> sampleNames){



Expand Down Expand Up @@ -466,7 +458,7 @@ class GatingSet{
}
}

GatingSet(vector<string> sampleNames):g_loglevel(NO_LOG){
GatingSet(vector<string> sampleNames){
vector<string>::iterator it;
for(it=sampleNames.begin();it!=sampleNames.end();it++)
{
Expand Down
16 changes: 9 additions & 7 deletions inst/include/cytolib/global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#ifndef GLOBAL_HPP_
#define GLOBAL_HPP_

enum loglevel_t{
NO_LOG = 0,
GATING_SET_LEVEL = 1,
GATING_HIERARCHY_LEVEL = 2,
POPULATION_LEVEL = 3,
GATE_LEVEL = 4
};
#define GATING_SET_LEVEL 1
#define GATING_HIERARCHY_LEVEL 2
#define POPULATION_LEVEL 3
#define GATE_LEVEL 4

extern unsigned short g_loglevel;
extern bool my_throw_on_error;

#ifdef ROUT
#include <R_ext/Print.h>
Expand All @@ -27,6 +27,8 @@ enum loglevel_t{
#include <vector>
using namespace std;

extern unsigned short g_loglevel;// debug print is turned off by default
extern bool my_throw_on_error;//can be toggle off to get a partially parsed gating tree for debugging purpose

inline void PRINT(string a){
#ifdef ROUT
Expand Down

0 comments on commit 591e906

Please sign in to comment.